Python print() Quiz
Free quiz on Python's print() function: 15 questions on quotes, escape characters, sep, end, flush and f-string formatting, with instant answers.
- Questions: 15
- Easy
Change one line, press Run and see what happens. Nothing to install and no account needed.
Press Run to see the output here.
Try 20, 50 and 90 and watch the answer change. 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 quiz on Python's print() function: 15 questions on quotes, escape characters, sep, end, flush and f-string formatting, with instant answers.
Three challenges, different every day. Fix or write the code and let the tests check it.
Write a check that passes only when fuel_needed(-5) raises ValueError, so a version that returns a value or raises the wrong error fails it, then pin down the message and the lengths that must still work.
The launch code from "API response" worked on a ready-made dict, but the API really sends JSON text. Turn it into a dict with json.loads(), see what false and null become, then handle a response cut off in transfer.
Turn the day's mission summary dict into JSON text with json.dumps() and indent=2, see what True, False and None become, then keep the station's Polish letters readable and sort the keys so the files compare easily.
Three short programs to read, run and change. A new set tomorrow.
Adding, changing and removing dictionary elements in Python.
Looping through keys, values or key-value pairs of a dictionary.
Dictionaries can contain other dictionaries. Useful for complex data structures.
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.