# 01 Break It Down
#there is nothing in this lesson
pass
# 02 Ahoy or Should I Say Ahoyay
print ("Welcome to the English to Pig Latin translator!")
Welcome to the English to Pig Latin translator!
# 03 Input
print ("Welcome to the English to Pig Latin translator!")
original = input("What's your name?")
Welcome to the English to Pig Latin translator! What's your name?plusjune
# 04 Check Yourself
print ("Welcome to the English to Pig Latin translator!")
original = input("What's your name?")
if len(original) != 0:
print (original)
else:
print ("empty")
Welcome to the English to Pig Latin translator! What's your name? empty
# 05 Check Yourself Some More
print ("Welcome to the English to Pig Latin translator!")
original = input("What's your name?")
if len(original) != 0 and original.isalpha():
print (original)
else:
print ("empty")
Welcome to the English to Pig Latin translator! What's your name?plusjune plusjune
# 06 Pop Quiz
print ("Welcome to the English to Pig Latin translator!")
original = input("What's your name?")
if len(original) != 0 and original.isalpha():
print (original)
else:
print ("empty")
Welcome to the English to Pig Latin translator! What's your name?plusjune plusjune
# 07 Ay B C
pyg = "ay"
# 08 Word Up
pyg = 'ay'
original = input('Enter a word:')
if len(original) > 0 and original.isalpha():
word = original.lower()
first = word[0]
print (word)
else:
print ('empty')
Enter a word:hello hello
# 09 E-I-E-I-O
pyg = 'ay'
original = input('Enter a word:')
if len(original) > 0 and original.isalpha():
word = original.lower()
first = word[0]
if first == "a" or first == "e" or first == "i" or first == "o" or first == "u":
print ("vowel")
else:
print ("consonant")
else:
print ('empty')
Enter a word:apple vowel
# 10 I would Like to Buy a Vowel
pyg = 'ay'
original = input('Enter a word:')
if len(original) > 0 and original.isalpha():
word = original.lower()
first = word[0]
if first == "a" or first == "e" or first == "i" or first == "o" or first == "u":
new_word = original + pyg
print (new_word)
else:
print ("consonant")
else:
print ('empty')
Enter a word:apple appleay
# 11 Almost Oneday
pyg = 'ay'
original = input('Enter a word:')
if len(original) > 0 and original.isalpha():
word = original.lower()
first = word[0]
if first == "a" or first == "e" or first == "i" or first == "o" or first == "u":
new_word = word + pyg
print (new_word)
else:
new_word = word[1:len(original)] + first + "ay"
print (new_word)
else:
print ('empty')
Enter a word:apple appleay
# 12 Testing Testing is This Thing On
pyg = 'ay'
original = input('Enter a word:')
if len(original) > 0 and original.isalpha():
word = original.lower()
first = word[0]
if first == "a" or first == "e" or first == "i" or first == "o" or first == "u":
new_word = word + pyg
print (new_word)
else:
new_word = word[1:len(original)] + first + "ay"
print (new_word)
else:
print ('empty')
Enter a word:apple appleay