Skip to content
pyexercises.

Learn Python by writing it.

Short lessons and real exercises, with feedback that shows you what to change.

Free. Nothing to install. No experience needed.

Try it: fix a beginner's mistake

Create a variable called name with the value "Alice", then print its value.

name = "Alice"print("name")
Solution Check

Needs changes

Line 2: You wrote print("name") but should have written print(name)

  • Variable 'name' is correct.

A guided example with real checker feedback. No account needed.

Needs changes. Read the finding to see what to change.

How it works

  1. Read a short lesson

    One idea at a time, with an example you can copy.

  2. Write the code

    Type it yourself and run it right in your browser.

  3. Check and fix

    The checker shows what worked and what to change. Stuck? Ask PyThor for a hint.

Questions

Is PyExercises free?

Yes. The lessons, exercises and solution checker are free. PyThor has request limits so that help remains available fairly.

Can I start without programming experience?

Yes. Python Fundamentals starts from the beginning and introduces one concept at a time.

Do I need to install Python?

No. You write and run Python in your browser. A free account saves your progress so you can pick up where you left off.

How does PyThor help, and are there limits?

PyThor is an optional AI tutor for Python questions, explanations and hints about your code. It can make mistakes, so use the lessons and solution checker to verify your work. The current allowance is three requests per hour and fifteen per day.

Start with Python Fundamentals.

Available nowPython Fundamentals

Coming soonPython Programming

Start learning free
Learn Python by writing it | PyExercises