iwantcoding.com
🔥 Daily 👥 Rooms 🏆 Top Log in Sign up

Python Exercises

Each Python lesson has a fill-in-the-blank exercise. Complete a short snippet with one or two missing tokens — the grader checks your answer against the expected output.

How it works

  • Read the instruction at the top.
  • Click the blank, type your answer, press Run.
  • A wrong answer triggers a hint; the second wrong try reveals the solution.

Why fill-in-the-blank

FormatWhat it tests
Multi-choice quizRecognition — "I've seen this."
Fill-in-the-blankRecall — "I can produce this."
Open-endedSynthesis — "I can build this from scratch."

Recall is the strongest predictor of retention. Blanks are small so the cognitive load stays on the concept.

Sample

PYTHON
# Instruction: print "Hello, world!"
print(____)

Answer: 'Hello, world!'.

Where to go next

  • Finish all 60+ Python exercises to unlock the "Built it from blanks" badge.
  • Try the 30-day bootcamp for daily challenges.
  • Pair every exercise with a Try it Yourself » in the editor — vary the snippet to build intuition.
Tip: If a blank stumps you, scroll up — the lesson's example almost always demonstrates the answer.

Example

Example
# Fill-in-the-blank to complete the line:
# print('Hello, ____!')
print('Hello, world!')
Try it Yourself »

Exercise

Exercise format is fill-in-the-…

fill-in-the-

Test yourself

Q1. Format is…
Q2. Recall vs recognition is best trained by…
Q3. Each lesson has…

Discussion

Loading…