Course · Beginner · 6 h · Available in Spanish, English:
Python from scratch
Run Python code in the browser and read error messages to fix it
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.
A sample lesson
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
12 lessons and about 4 h 35 min of content. You go at your own pace, with no fixed dates.
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.