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.
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.
Make abort(reason, *, confirm) refuse to run unless confirm=True is passed by name: a bare * makes confirm keyword-only and required, then an is True check refuses values that are merely truthy, such as "yes".
A Python program stops with a traceback. Read it from the bottom up to find the error, the function and the line, fix the bug there, then follow a longer traceback through four calls to a second bug.
The burn length is typed in by hand, and a typo stops the program with a ValueError. Catch it with try and except, keep asking until the input is a number, then also turn away zero and negative lengths.
Three short programs to read, run and change. A new set tomorrow.
Methods sort() and reverse() for ordering list elements.
Tuples are immutable lists. Once created, they cannot be modified.
Tuple unpacking assigns its elements to separate variables simultaneously.
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.