Coding
First Python Quiz Game for Kids
Copy, paste, and customize a beginner Python quiz game for kids while learning print(), input(), variables, and if statements.
Easy · 1 hour

Introduction
Coding is like giving super-clear instructions to a computer so it can do something useful or fun for you.
This beginner Python project is built for kids and first-time coders: you will copy a starter quiz game, run it, then customize the questions and score.
The Why
Computer programs follow instructions one step at a time. Python uses commands like `print()` to show messages, `input()` to collect answers, and variables to remember information such as a score.
Python Program for Kids: Start With a Quiz Game
A quiz is a great first Python program because it uses the ideas beginners need most: showing text, asking for input, checking an answer, and keeping score. You can copy the starter code below first, then change the questions to match sports, animals, books, science, or anything else you like.
Step-by-Step Instructions
- 1
Open a beginner-friendly Python editor online and start a new project.
- 2
Type a `print()` line to welcome the player to your quiz game.
- 3
Make a score variable and set it to 0 so your game can count points.
- 4
Use `input()` to ask the player a question and store the answer in a variable.
- 5
Add an `if` statement to check whether the answer is correct.
- 6
Increase the score when the player gets a question right, then show the new score with `print()`.
- 7
Run your program, test it, and fix any mistakes until your quiz works smoothly.
The four building blocks
These are the only Python commands you need to build a working quiz game.
- print()
- Shows text on screen. Try: print("Hello!"). The computer displays exactly what is inside the quotes.
print("Welcome to my quiz!")- input()
- Pauses the program and waits for the user to type something. The answer is stored in a variable so you can check it later.
answer = input("What is 2 + 2? ")- variables
- A named container that holds a value. You can change what is inside it during the program, perfect for keeping score.
score = 0
- if statements
- Lets the program make a decision. If a condition is true, run one block of code. If not, skip it or do something else.
if answer == "4": score = score + 1
Copy/Paste Starter Code for a First Python Quiz Game
Copy this into Replit or Trinket and run it. Then modify the question to make it your own.
score = 0
print("Welcome to my quiz!")
answer = input("What is the capital of France? ")
if answer.lower() == "paris":
score = score + 1
print("Correct!")
else:
print("Not quite, it's Paris.")
print("Your score:", score, "out of 1")How to Customize Your Beginner Python Project
Change the question text inside input().
Change the correct answer inside the if statement.
Add two more questions by copying the answer/input/if pattern.
Print a different message for a perfect score.
Ask a friend to play, then fix anything that feels confusing.