Lab 4: Pyglatin

pyglatin 4

Description: In this lab we learned how the Pyglatin worked in python. We went step by step building up on this code to get the final result. We learned how to use the vowel and the consonant. Also how to remove/ use the slice to remove certain letters. This pyglatin lab showed a lot of cool new things that we can work with on python. After doing this lab i saw that there is still much to learn.

Source code: 

pyg = ‘ay’
original = raw_input(‘Enter a word:’)
word = original.lower()
first = word[0]
if len(original) > 0 and original.isalpha():
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