Knowledge organisersData Types and Casting
int, real, bool, char, string.
Every value in Python has a data type. The most common are int (whole numbers), float (decimals), str (text), and bool (True/False). Use type() to check.
int: whole numbers like 5, -3float: decimals like 3.14, -0.5str: text in quotes like "hello"bool: True or Falsetype() returns the data type of a valueage = 15 # int
price = 9.99 # float
name = "Alice" # str
passed = True # bool
print(type(age)) # <class 'int'>