# RETURN Mini Project — Username Generator
# return frees the value — use it however you want

# ─────────────────────────────────────────────
# Functions
# ─────────────────────────────────────────────

def generate_username(name, year, prefix="rhd_"):
    return prefix + name.replace(" ", "").lower() + year[-2:]

def print_username(username):
    print(f"Your username is: {username}")

# ─────────────────────────────────────────────
# Three ways to use the returned value
# ─────────────────────────────────────────────

username = generate_username("Bull", "2001")

print(username)                          # rhd_bull01
print(f"Your username is: {username}")   # Your username is: rhd_bull01
print_username(username)                 # Your username is: rhd_bull01

# same value — three different uses

# ─────────────────────────────────────────────
# Different prefix
# ─────────────────────────────────────────────

username = generate_username("RedHorn", "2001", "dev_")
print_username(username)    # Your username is: dev_redhorn01

# ─────────────────────────────────────────────
# Pass directly — no variable needed
# ─────────────────────────────────────────────

print_username(generate_username("Bull", "2001"))    # Your username is: rhd_bull01

# ─────────────────────────────────────────────
# Go further
# ─────────────────────────────────────────────

# Generate two usernames and print both
# Add validate_username() — check if longer than 5 characters
# Pass returned value directly to print_username()
