What You Will Build
Meet PyQuiz — the project you will build in this course
PyQuiz
In this course, you will build PyQuiz — a terminal app that tests your Python knowledge with multiple-choice questions.
Here is what the finished quiz looks like when you run it:
=== Python Quiz ===
What is the type of the value 3.14?
1) int
2) str
3) float
4) bool
Your answer (1-4): 3
Correct! +10 points
Score: 10 (100%)How the quiz works
Before you start writing code, here is a quick overview of the moving parts:
- Questions and answers are stored in your code. Each question has a text, four options, and a correct answer. You will write these yourself.
- The display shows the player a question and numbered options. This is the first thing you will build.
- Player input lets the player type a number to pick their answer. The quiz reads what they type and compares it to the correct answer.
- Feedback tells the player if they got it right or wrong — and shows the correct answer when they miss.
- Scoring tracks how many points the player has earned and calculates a percentage at the end.
You will build each of these pieces one at a time, in order. By the end, they all work together as a complete quiz.