"""
Topic: Strings: Basic String Methods
Purpose: Explore some common ways to change or manipulate text in Python
Output: Shows how to use .upper(), .lower(), and .replace() on strings
"""
# -----------------------------
# 1. Example string
# -----------------------------
text = "Python is Fun!"
# -----------------------------
# 2. Changing to uppercase
# -----------------------------
upper_text = text.upper() # Converts all letters to uppercase
print(f"Original text: {text}")
print(f"Uppercase: {upper_text}")
# -----------------------------
# 3. Changing to lowercase
# -----------------------------
lower_text = text.lower() # Converts all letters to lowercase
print(f"Lowercase: {lower_text}")
# -----------------------------
# 4. Replacing parts of a string
# -----------------------------
# The .replace(old, new) method replaces old text with new text
replaced_text = text.replace("Fun", "Awesome")
print(f"After replace: {replaced_text}")
# -----------------------------
# 5. Notes
# -----------------------------
# 1. Strings are immutable, so these methods return a new string and do not change the original.
# 2. .upper() makes all letters capital.
# 3. .lower() makes all letters small.
# 4. .replace(old, new) replaces all occurrences of 'old' with 'new'.