เส้นทางการเรียนรู้

แบบฝึกหัด Python

แบบฝึกหัดคลาสสิกสำหรับมือใหม่เรื่องตัวเลข ข้อความ และลิสต์ แต่ละข้อตามด้วยโจทย์ให้ลองแก้เอง

บทเรียน 15 บท · โจทย์ 26 ข้อ

เริ่มเส้นทาง →

1 ตัวเลขและหลัก บทเรียน 6 บท

  1. บทเรียน โจทย์ 2 ข้อ Sum the Digits of a Number Add every decimal digit in an integer.
  2. บทเรียน โจทย์ 2 ข้อ Reverse an Integer in Python Reverse the decimal digits of an integer.
  3. บทเรียน โจทย์ 2 ข้อ Check an Armstrong Number Check whether a number equals the sum of its powered digits.
  4. บทเรียน โจทย์ 1 ข้อ Check a Perfect Number Check whether proper divisors add up to the number.
  5. บทเรียน โจทย์ 2 ข้อ Check a Leap Year in Python Apply Gregorian leap-year rules.
  6. บทเรียน โจทย์ 3 ข้อ ตรวจสอบจำนวนเฉพาะใน Python ตรวจอย่างมีประสิทธิภาพว่าจำนวนเต็มเป็นจำนวนเฉพาะหรือไม่

2 โจทย์ข้อความ บทเรียน 5 บท

  1. บทเรียน โจทย์ 2 ข้อ กลับลำดับ String ใน Python กลับตัวอักษรด้วย slicing
  2. บทเรียน โจทย์ 2 ข้อ Count Vowels in Python Count vowels in a line of text.
  3. บทเรียน โจทย์ 2 ข้อ Check Anagrams in Python Check whether two texts contain the same letters.
  4. บทเรียน โจทย์ 1 ข้อ Check Password Strength Validate several basic password requirements.
  5. บทเรียน โจทย์ 1 ข้อ Caesar Cipher in Python Shift lowercase letters by a fixed amount.

3 โจทย์ลิสต์ บทเรียน 4 บท

  1. บทเรียน โจทย์ 2 ข้อ Find the Second Largest Value Find the second distinct largest list value.
  2. บทเรียน โจทย์ 1 ข้อ Remove Duplicate List Values Remove duplicates while preserving their first-seen order.
  3. บทเรียน โจทย์ 2 ข้อ Flatten a Nested List Flatten a one-level nested list.
  4. บทเรียน โจทย์ 1 ข้อ Split a List into Chunks Divide a list into fixed-size groups.