2.2.1.3 Creating Different Types of Variables
Python Programming
In Python, you can create variables of different types to store various kinds of data. Here are some common types of variables:
- Integer (int): Stores whole numbers. Example: age = 17
- Floating-point (float): Stores decimal numbers. Example: price = 19.99
- String (str): Stores text. Example: name = "Ali"
- Boolean (bool): Stores True or False. Example: is_student = True