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