π Quick Lesson
In Python, variables are used to store data, and data types define what kind of data you are working with.
- int: whole numbers, e.g.,
x = 5
- float: decimal numbers, e.g.,
pi = 3.14
- str: text, e.g.,
name = "Alice"
- bool: True or False values, e.g.,
is_on = True
Python is dynamically typed, meaning you donβt have to declare the typeβit figures it out for you!
We'll go into more detail in the upcoming sections, but make sure you understand the basics first.