Two types of numbers
Python has two ways to store numbers: Integers - Whole numbers without decimalsPython uses a dot (.) for decimals, not a comma. Writing
3,14 creates a tuple, not the number 3.14!Why two types?
Python separates integers and floats for efficiency - computers can work with whole numbers faster and more precisely. But here’s the reassuring part: in practice, you rarely need to think about this. Python handles the conversion automatically when needed, and most of the time you’ll just use whatever makes sense - whole numbers for counting things, decimals for measurements and calculations.Basic math operations
Numbers work just like a calculator:Integer vs float division
Division has two forms:These are just the basics! Python can solve complex math problems too. When you need square roots, trigonometry, or advanced calculations, ask AI to help with the specific syntax - no need to memorize every math symbol right now.
Common mistakes
Division always returns float
Division always returns float
Can't use commas in numbers
Can't use commas in numbers
What’s next?
Now let’s learn about working with text in Python!Strings
Text and characters