Code viewer for World: Integers, Floats
"""
Topic: Variables and Data Types: Integers and Floats
Purpose: Introduce numeric data types
Output: Displays values and their types in the terminal
"""

# -----------------------------
# 1. What are Integers and Floats?
# -----------------------------
# Integers (int) are whole numbers without a decimal point.
# Examples: 0, 5, -10, 100

# Floats (float) are numbers with a decimal point.
# Examples: 0.0, 3.14, -7.5

# -----------------------------
# 2. Creating integer variables
# -----------------------------
age = 25
year = 2025

# -----------------------------
# 3. Creating float variables
# -----------------------------
height = 5.9
pi = 3.14

# -----------------------------
# 4. Printing values
# -----------------------------
print("Age:", age)       # prints 25
print("Year:", year)     # prints 2025
print("Height:", height) # prints 5.9
print("Pi:", pi)         # prints 3.14

# -----------------------------
# 5. Checking variable types
# -----------------------------
print("Type of age:", type(age))       # <class 'int'>
print("Type of year:", type(year))     # <class 'int'>
print("Type of height:", type(height)) # <class 'float'>
print("Type of pi:", type(pi))         # <class 'float'>

# -----------------------------
# 6. Notes
# -----------------------------
# 1. Integers are used for whole numbers.
# 2. Floats are used for numbers with decimals.
# 3. Python automatically assigns the correct type based on the value.