Skip to main content

Python exercises for beginners: 36 challenges with solutions

Published on November 25, 2026 · Updated on November 28, 2026

A practice bank to get comfortable writing Python. You solve 36 short challenges organized by topic: variables and operations, conditionals, for and while loops, strings, lists and tuples, dictionaries, and functions. Everything is solved in the browser, and each lesson takes about 20 to 25 minutes: a short review with an example and three challenges. You read a problem with a sample output, complete the code, press Check, and know instantly whether it works. If you get stuck, you have three gradual hints and, after you try it, the commented reference solution. Each lesson stands on its own, so you can start with the topic you need.

lessons
12
modules
7
of content
4 h 35 min

A sample lesson

python
precio = 12.5
cantidad = 3
total = precio * cantidad            # 37.5
print(total + 2, total - 2, total / 2)
print(135 / 60, 135 // 60, 135 % 60)
promedio = 22 / 3                    # 7.333333333333333
print(round(promedio, 1), f"{total:.2f}")

Available in: EN · ES

By the end, you'll be able to

  • Solve, without help, a short problem that combines conditions and for or while loops, including its edge cases
  • Write correct calculations with operators, integer division, modulo, round, and output formatted with f-strings
  • Choose the right type and transform numbers, booleans, and strings with their basic operations and methods
  • Filter, sort, search, count, and group data with lists, tuples, and dictionaries
  • Write functions with parameters, default values, and return, and combine them to solve a complete problem

Course content

12
12 interactive lessons

Frequently asked questions

How long is Python exercises for beginners: 36 challenges with solutions?

12 lessons and about 4 h 35 min of content. You go at your own pace, with no fixed dates.

What will you learn in Python exercises for beginners: 36 challenges with solutions?

By the end you will be able to: Solve, without help, a short problem that combines conditions and for or while loops, including its edge cases; Write correct calculations with operators, integer division, modulo, round, and output formatted with f-strings; Choose the right type and transform numbers, booleans, and strings with their basic operations and methods.

Similar content

Other courses, projects and specializations related to this content.

Course · Beginner · 6 h · Available in Spanish, English:

Python from scratch

Run Python code in the browser and read error messages to fix it

Free