Kids Coding

Numbers and Math

Add, subtract, multiply, divide. Python does the arithmetic. You choose the numbers.

KidsBasicNumbers and Math

Python can do maths

Numbers do not need quotes. 2 + 3 is maths. "2 + 3" is just the characters 2, space, plus, space, 3.

Add, subtract, multiply, divide

print(2 + 3)
print(10 - 4)
print(3 * 5)
print(8 / 2)

The symbols

SymbolMeaningExample
+add2 + 3 is 5
-subtract10 - 4 is 6
*multiply3 * 5 is 15
/divide8 / 2 is 4.0

Division gives a number with a decimal, even when it divides evenly. 8 / 2 prints 4.0.

Print a label and a number

You can print text and a number in one line if you separate them with a comma. Python puts a space between them.

Score

print("Score:", 2 + 2 + 2)

Real life

Buying snacks at the school stall.

You already do this in your head: 3 cookies times 2 coins. Python does the arithmetic.

Snack stall

cookies = 3
price = 2
print("Pay:", cookies * price)
print("Change from 10:", 10 - cookies * price)

Change one word. Run it. That is how this idea shows up outside the lesson.

Try it

Exercise 1: Print the answer to 7 * 6, with the label Answer:.

Show solution
print("Answer:", 7 * 6)

FAQ: Numbers and Math

Common questions about this page.

What is StudyGrid Kids?

StudyGrid Kids is a free coding path for children: Basic, Intermediate, and Advanced. Lessons use Python in the browser. No account and no install.

Should I run numbers and math examples locally for better learning?

Yes. Use the browser editor on StudyGrid for a quick check, then Download the example and run it on your computer. Local runs show real errors and the real toolchain, which is one of the fastest ways to learn numbers and math in this Kids Coding Python lesson (Numbers and Math).

Which kids level should we start with?

Start at Basic if the child has never written code. Choose Intermediate if they can print, use variables, and write a simple if. Choose Advanced if they already use loops and lists.

Do kids need an account or an app?

No. Kids pages are public. Code runs in the Try Python editor at /try. We do not ask children for a name or an email.

What language do kids learn?

Python, with a first HTML page in Intermediate and Advanced. After Advanced, the main Python tutorial is the next step.

Is the kids coding track free?

Yes. The Kids home, the three levels, and the Python editor on StudyGrid (studygrid.in) are free.