PygLatin

Lesson 01/11 – Break It Down

 

Lesson 02/11 – Ahoy! (or Should I Say Ahoyay!)

 
print ("Welcome to the English to Pig Latin translator!")

Lesson 03/11 – Input!

 
print ("Welcome to the English to Pig Latin translator!")
original = raw_input('Please digit a word here')

Lesson 04/11 – Check Yourself!

 
print ("Welcome to the English to Pig Latin translator!")
original = raw_input('Please digit a word here')
if original == "":
    print ("empty")
else:
    print (original)

Lesson 05/11 – Check Yourself… Some More

 
print ("Welcome to the English to Pig Latin translator!")
original = raw_input('Please digit a word here')
if original.isalpha():
    print (original)
else:
    print ("empty")

Lesson 06/11 – Pop Quiz!

 
print ("Welcome to the English to Pig Latin translator!")
original = raw_input('Please digit a word here')
if original.isalpha():
    print (original)
else:
    print ("empty")

Lesson 07/11 – Ay B C

 
pyg = "ay"

Lesson 08/11 – Word Up

 
pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
    print original
    word = original.lower()
    first = word[0]
else:
    print 'empty'

Lesson 09/11 – Move it on Back

 
pyg = 'ay'

original = raw_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:
        print "consonant"
else:
    print 'empty'

Lesson 10/11 – Ending Up

 
pyg = 'ay'

original = raw_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:] + first + pyg
        print new_word
else:
    print 'empty'

Lesson 11/11 – Testing, Testing, is This Thing On?

 
pyg = 'ay'

original = raw_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:] + first + pyg
        print new_word
else:
    print 'empty'