# FOR IF Mini Project — Pig Latin
# for + if + continue — translate a sentence, skip what doesn't fit

# ─────────────────────────────────────────────
# String slicing reminder
# ─────────────────────────────────────────────

word = "Bull"
print(word[1:])    # ull — everything from index 1 onward
print(word[0])     # B — first character

# ─────────────────────────────────────────────
# Pig Latin Translator
# ─────────────────────────────────────────────

sentence = input("Enter a sentence: ").lower()
words = sentence.split()
vowels = "aeiou"
result = ""

for word in words:
    if len(word) <= 1:
        continue    # skip — too short to translate

    if word[0] in vowels:
        result += word + "yay "
    else:
        result += word[1:] + word[0] + "ay "

print(result.strip())

# ─────────────────────────────────────────────
# Test it
# ─────────────────────────────────────────────

# Enter a sentence: bull horn red
# ullbay ornhay edray

# Enter a sentence: a bull and a horn
# ullbay andyay ornhay
# "a" appears twice — both skipped by continue

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

# Handle words that start with multiple consonants — "string" → "ingstray"
# Use break to stop translating after the first 5 words
# What happens with numbers in the sentence? Can you handle them with continue?

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

# continue   — skips current iteration, loop keeps going
# word[1:]   — everything from index 1 onward
# word[0]    — first character
# in vowels  — True if character is a vowel
# .split()   — separates sentence into individual words
