# Your first function
# def — define once, call anywhere

# ─────────────────────────────────────────────
# Defining a function
# ─────────────────────────────────────────────

def greet():
    print("Hello, Bull.")
    print("Welcome to TheRedHorn.")

# function is defined — nothing runs yet

# ─────────────────────────────────────────────
# Calling a function
# ─────────────────────────────────────────────

greet()    # Hello, Bull. / Welcome to TheRedHorn.

# ─────────────────────────────────────────────
# Define once. Call many times.
# ─────────────────────────────────────────────

greet()
greet()
greet()

# Hello, Bull.
# Welcome to TheRedHorn.
# — three times

# ─────────────────────────────────────────────
# Functions can use everything you know
# ─────────────────────────────────────────────

def count_vowels():
    word = input("Enter a word: ")
    count = 0
    for letter in word:
        if letter.lower() in "aeiou":
            count += 1
    print(f"Vowels found: {count}")

count_vowels()

# ─────────────────────────────────────────────
# Quick reference
# ─────────────────────────────────────────────

# def function_name():   — colon is mandatory
#     block              — 4 spaces indentation
#
# function_name()        — call it
#
# define before you call — Python reads top to bottom
# defining doesn't run it — calling does
# parentheses required — both when defining and calling
