Code viewer for World: Addition and Subtraction
"""
Topic: Basic Arithmetic Operations – Addition and Subtraction
Purpose: Understand how to perform addition and subtraction with numbers
Output: Displays results of simple calculations in the terminal
"""

# -----------------------------
# 1. Introduction
# -----------------------------
# Python can perform math using numbers.
# Addition (+) is used to add numbers together.
# Subtraction (-) is used to find the difference between numbers.

# -----------------------------
# 2. Example numbers
# -----------------------------
num1 = 10
num2 = 5

# -----------------------------
# 3. Addition
# -----------------------------
# The + operator adds two numbers

sum_result = num1 + num2
print(f"{num1} + {num2} = {sum_result}")  # prints: 10 + 5 = 15

# -----------------------------
# 4. Subtraction
# -----------------------------
# The - operator subtracts one number from another

diff_result = num1 - num2
print(f"{num1} - {num2} = {diff_result}")  # prints: 10 - 5 = 5

# -----------------------------
# 5. Notes
# -----------------------------
# 1. Python can handle both integers (whole numbers) and floats (decimal numbers) in addition/subtraction.
# 2. You can also add/subtract variables that store numbers from user input.
# 3. Always remember: + is for adding, - is for subtracting.