Skip to content
← Python for AI/ML · all 50 levels

Math operators

Level 8 of 50 · Basics

Level 8 of 50

Math operators

explained with a samosa party. Watch the reel, then work through it below: run the code, take the quiz, keep the cheat sheet.

📒 Open the cheat sheet
Sana17 samosas, 5 friends. How many does each one get?
TeacherLet Python do the maths! Math operators!
samosa.py
print(17 + 5)
print(17 * 2)
print(17 / 5)
Teacher+, -, * for times, / for divide!
Sana3.4 samosas? Who eats 0.4?!
samosa.py
print(17 // 5)
print(17 % 5)
TeacherHa! // gives whole samosas. % gives the leftovers!
Teacher3 each, and 2 left for me!

⏸ Pause & predict: what prints?

print(10 / 2)

Where this leads

Python is step one. Building AI that ships is the rest.

The diploma takes you from zero to deployed computer vision, LLM and agent projects, with engineers who build them for a living. Already code? The bootcamp does it in three months.