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.
Extend the feed parser from "Skip blanks and comments": a faulty sensor sends ERR and float() stops the program. Skip lines that fail to convert and count them, then let one try cover short lines too and print each error.
A bare except: reports every fuel reading as bad, because it also catches a NameError from a typo. Predict the last line, find the hidden error, catch only ValueError and fix the typo, then write a parser that lets other errors through.
fuel_needed() quietly returns negative fuel for a negative burn length. Make it raise ValueError with a message that shows the bad value, then raise TypeError, checked first, when the length isn't a number at all.
Three short programs to read, run and change. A new set tomorrow.
When to use tuples instead of lists? Comparison of properties and applications.
Tuples have only two methods: count() for counting and index() for searching.
Dictionaries store data as key-value pairs. Fast access to data by key.
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.