Numbers and Calculations
Python can check calculations quickly while you focus on the problem.
Discover
- Numbers do not need quotes.
- Use +, -, * and / for arithmetic.
- Parentheses make the intended order clear.
Try, explain and change
Try: A quiz awards 12 points for round one and 8 points for round two. Calculate 12 + 8 in Python and print exactly “20”. Do not type the answer as a quoted string.
Change: Predict the new score if round two awards 5 points instead, then run it.
Try the challenge
A quiz awards 12 points for round one and 8 points for round two. Calculate 12 + 8 in Python and print exactly “20”. Do not type the answer as a quoted string.
20Match the lines and order. Your code must use the lesson concept.
The runner supports this pathway’s controlled Python concepts while blocking packages, files, networks and system commands.
Your output will appear here.
Find the bug
print("12" + 8)Show debugging clue
Quoted 12 is text, but 8 is a number. Remove the quotes.
Which operator multiplies numbers?
+
Not this time. Review Discover and try again.
*
Correct — well reasoned.
/
Not this time. Review Discover and try again.
Create and reflect
Create: Make a three-line score calculator using addition, subtraction and multiplication.
Reflect: How are numbers different from text in Python?
Add a third round worth 6 points; show your calculation and predicted final score.
Edit and run your code again to explore this variation. It does not change lesson completion.