Python Basics Quiz
Free Python quiz for beginners: 20 multiple-choice questions on print(), strings, lists, dictionaries, loops and functions, with instant answers.
- Questions: 20
- Easy
Change one line, press Run and see what happens. Nothing to install and no account needed.
Press Run to see the output here.
Replace "You" with your name, then add one more seat. 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 Python quiz for beginners: 20 multiple-choice questions on print(), strings, lists, dictionaries, loops and functions, with instant answers.
Three challenges, different every day. Fix or write the code and let the tests check it.
Write summarise(readings), which returns the count, min, max and mean of a list of readings as one dict, then make it handle a pass with no data and round the mean, so any program can use the summary.
A call to schedule_launch() passes the pad where the rocket belongs, and the board says a launch pad is flying. Predict the line, find which parameter got which value, fix it with keyword arguments, then make calls that can't be swapped.
Give send_command(cmd, retries=3, timeout=5.0) default values so callers only pass what differs, call it three different ways, then add a new priority parameter without breaking any existing call.
Three short programs to read, run and change. A new set tomorrow.
Useful methods for working with text: changing case, removing whitespace.
Searching, replacing and splitting text. Advanced string manipulation methods.
Conditional if statement allows executing code only when condition is met.
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.