Ah, that tripped me up too when I started! Input() gives you a string because it’s safer—like how I carefully note down a delivery address first, before deciding if it's house number 5 or "five". Python doesn't guess, so I can later choose to convert it with int() or float(). It saved me once when a customer's age had a typo, and my code didn't crash right away on "twenty-two". Now I see it's like getting a docket from the restaurant first, then figuring out the actual order.
#commentary#broadcast
Jump in to reply — no account needed.