0Pricing
Coding for Kids · Lesson

Making Questions

Create math problems.

Making Questions is a free Coding for Kids lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Coding for Kids learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Build a Math Quiz! 🧮🎮

Let's build our own MATH QUIZ game! 🎉 The computer will ask math questions and check if you got them right.

First, we need to MAKE the questions. Let's start! 🚀

print('Welcome to the Math Quiz!')

Computers Can Do Math ➕

Python is great at math! You can add with +, subtract with -, and multiply with *.

Try it! Python figures out the answer instantly. 🤖

print(5 + 3)
print(10 - 4)
print(6 * 2)

Show a Math Question 🤔

To ask a question, we just print it!

Let's show the question 'What is 7 + 5?' on the screen. 📋

print('What is 7 + 5?')

Store the Answer in a Box 📦

A variable is like a labeled box that holds a value. 📦

answer = 12 puts the number 12 in a box named answer. We can use it later!

answer = 7 + 5
print(answer)

Question and Answer Together 🎯

Let's keep the question AND its answer ready. 🎯

We show the question, then store the correct answer in a box for later checking.

print('What is 8 + 6?')
correct = 8 + 6
print('The answer is', correct)

Make Random Numbers! 🎲

A real quiz has different numbers each time! We use random for that. 🎲

random.randint(1, 10) picks a surprise number between 1 and 10!

import random

x = random.randint(1, 10)
print('Random number:', x)

A Random Math Question 🎲➕

Let's pick two random numbers and make a question from them! 🤩

Each time you run it, the numbers change. A new quiz every time!

import random

a = random.randint(1, 10)
b = random.randint(1, 10)
print('What is', a, '+', b, '?')

Calculate the Right Answer ✅

The computer needs to know the correct answer to check you later! 🧠

We store correct = a + b. The computer does the math for us!

import random

a = random.randint(1, 10)
b = random.randint(1, 10)
correct = a + b
print('What is', a, '+', b, '?')
print('(The answer is', correct, ')')

Different Kinds of Questions ✖️➖

We can make subtraction or multiplication questions too! 🔢

Just change + to - or *. Mix it up to keep players on their toes!

import random

a = random.randint(1, 9)
b = random.randint(1, 9)
correct = a * b
print('What is', a, 'x', b, '?')
print('(The answer is', correct, ')')

Many Questions With a Loop 🔁

A quiz has more than one question! Use a loop to make 3 of them. 🔁

for q in range(3): makes 3 questions in a row!

import random

for q in range(3):
    a = random.randint(1, 10)
    b = random.randint(1, 10)
    print('What is', a, '+', b, '?')

Make Your Own Questions! 🎲🎨

Your turn! Change the numbers in randint to make easier or harder questions. 🤩

Try randint(1, 100) for a tough challenge! 💪

import random

for q in range(2):
    a = random.randint(1, 20)
    b = random.randint(1, 20)
    correct = a + b
    print('What is', a, '+', b, '?')
    print('Answer:', correct)

Quick Check ✅

Math quiz brain teaser! 🧠🎲

Questions Ready! 🎲🎉

Great start! You can make quiz questions now! You learned:

  • Python does math with + - * ➕➖✖️
  • Variables are boxes that hold values 📦
  • random.randint(1, 10) makes surprise numbers 🎲
  • Loops make many questions 🔁

Next: check if the player's answer is RIGHT! ✅

Frequently asked questions

Is the “Making Questions” lesson free?

Yes — the full text of “Making Questions” is free to read here on the web, and the Coding for Kids course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Coding for Kids course, upgrade to CoddyKit PRO.

What will I learn in “Making Questions”?

Create math problems. You practise Coding for Kids with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Coding for Kids?

No prior experience is required. Coding for Kids on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Making Questions” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Coding for Kids lesson?

Yes. Every Coding for Kids lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Making Questions
  2. Checking Answers
  3. Keeping Score
  4. Final Score
← Back to Coding for Kids