Skip to content

← Code

Python Practice

Coding challenges from 1★ to 5★.

python 40 Lessons

Every lesson runs in your browser — write real code, press Run, and the tasks check themselves. Free, no account needed, with notes in English and Chinese.

Start the course

Lessons in this course

  1. 01 Print a word
  2. 02 Print another word
  3. 03 Print a sentence
  4. 04 Print with a !
  5. 05 Print two lines
  6. 06 Print three lines
  7. 07 Print a number
  8. 08 Print a bigger number
  9. 09 Add two numbers
  10. 10 Add bigger numbers
  11. 11 Subtract
  12. 12 Multiply
  13. 13 Divide
  14. 14 Remainder
  15. 15 Use a variable
  16. 16 A number variable
  17. 17 Change a variable
  18. 18 Add two variables
  19. 19 Multiply two variables
  20. 20 Join two words
  21. 21 Greet a name
  22. 22 Repeat text
  23. 23 Ask for a name
  24. 24 Echo a number
  25. 25 Your first function
  26. 26 Is it positive?
  27. 27 The bigger one
  28. 28 The last item
  29. 29 Is it even?
  30. 30 Sum a list
  31. 31 Reverse a string
  32. 32 Count the vowels
  33. 33 FizzBuzz
  34. 34 Letter frequencies
  35. 35 Remove duplicates
  36. 36 Second largest
  37. 37 Group anagrams
  38. 38 Flatten a nested list
  39. 39 RPN calculator
  40. 40 Run-length encoding

Language reference

/know/reference/python

Log in or create account

IGCSE, A-Level & AP