25
Sometimes a user types a number, but Python sees it as text (a string). We use int() to turn it into an integer or float() for decimals.
Think of it like translating a word into a value. You can't do math with the word "500", but you can with the number 500. This 'casting' is a vital skill.
Log in to add a comment.