Parcours d'apprentissage

Exercices pratiques en Python

Des exercices classiques pour débutants sur les nombres, le texte et les listes, chacun suivi d'un défi à résoudre seul.

15 leçons · 26 défis

Commencer le parcours →

1 Nombres et chiffres 6 leçons

  1. Leçon 2 défis Sum the Digits of a Number Add every decimal digit in an integer.
  2. Leçon 2 défis Reverse an Integer in Python Reverse the decimal digits of an integer.
  3. Leçon 2 défis Check an Armstrong Number Check whether a number equals the sum of its powered digits.
  4. Leçon 1 défi Check a Perfect Number Check whether proper divisors add up to the number.
  5. Leçon 2 défis Check a Leap Year in Python Apply Gregorian leap-year rules.
  6. Leçon 3 défis Tester un nombre premier en Python Vérifier efficacement si un entier est premier.

2 Problèmes de texte 5 leçons

  1. Leçon 2 défis Inverser une chaîne en Python Inverser les caractères avec le slicing Python.
  2. Leçon 2 défis Count Vowels in Python Count vowels in a line of text.
  3. Leçon 2 défis Check Anagrams in Python Check whether two texts contain the same letters.
  4. Leçon 1 défi Check Password Strength Validate several basic password requirements.
  5. Leçon 1 défi Caesar Cipher in Python Shift lowercase letters by a fixed amount.

3 Problèmes de listes 4 leçons

  1. Leçon 2 défis Find the Second Largest Value Find the second distinct largest list value.
  2. Leçon 1 défi Remove Duplicate List Values Remove duplicates while preserving their first-seen order.
  3. Leçon 2 défis Flatten a Nested List Flatten a one-level nested list.
  4. Leçon 1 défi Split a List into Chunks Divide a list into fixed-size groups.