fayotech.academy🐍 Python: First Steps
Say hello

🧮 Numbers & a broken bill

Why: Do real arithmetic and convert text to numbers.

Unlocks: Conditions and loops that count and compare.

You raced the computer once — it did a billion additions while you tapped a button. Time to put that speed to work. Python does math with the symbols you'd guess: + - * (multiply) / (divide).

Numbers and variables mix naturally. But here's a trap every beginner meets: input() always hands you text, even when the human types digits. Text "5" and number 5 are different creatures — remember the decoder game: the character 5 has its own code!

To turn text into a whole number, wrap it in int(...).

Now the real exercise. This little restaurant program is supposed to split a bill of 120 between 4 friends and print 30.0 — but someone broke it. Fix the bug.

Quick challenge

Why does int(input()) exist? What would input() + 1 do?

🔍 Go deeper: watch the division happen step by step, including why it prints 30.0 and not 30 → PyDebug: Numbers & Math.