Python Error Messages Quiz
Free beginner quiz: 15 Python errors to read and fix – NameError, TypeError, ValueError, IndexError, KeyError, IndentationError and ZeroDivisionError.
- Questions: 15
- Easy
- Free account needed
Change one line, press Run and see what happens. Nothing to install and no account needed.
Press Run to see the output here.
Make the sky bigger, or swap the star for another character. Open the full editor →
Discover the latest in space science and Python programming. Our newest articles blend astronomy concepts with coding challenges to fuel your cosmic curiosity.
AI now writes a large share of new code, so is learning Python still worth your time? Yes, but for a different reason than ten years ago. Using job data, developer surveys and recent studies on learning with AI, we look at what changed and where Python’s
Learn to write your own Python functions, from your first def to return values, default parameters and scope, with runnable examples, common mistakes and six practice projects.
In Project Hail Mary, the alien engineer Rocky counts in base 6 because he has two hands with three fingers each. In this article, you'll build Python programs that convert between decimal, base-6, and Eridian notation.
Questions and answers from other people learning Python.
A different quiz every Monday. How many will you get right?
Free beginner quiz: 15 Python errors to read and fix – NameError, TypeError, ValueError, IndexError, KeyError, IndentationError and ZeroDivisionError.
Three challenges, different every day. Fix or write the code and let the tests check it.
Print the rocket's name and the first mission patch URL from a nested launch response by chaining keys and indexes, then add the operator and orbit and cope with a launch that has no patches yet.
Print one cargo manifest line for every record in a list of dicts, reading each field by key, then add up the masses in the same loop for a total line.
Print only the launches whose status is Go from a list of launch dicts, then collect the others with their status into one "not go yet" line, or none.
Three short programs to read, run and change. A new set tomorrow.
Return can be used to exit function early when a condition is met.
Functions can return complex data structures like dictionaries or lists.
Local variables exist only inside functions. Global ones are accessible everywhere.
A free account saves your progress on paths, quizzes and challenges, keeps the code you write, and lets you ask and answer in the community.