lab 4

Summary

In this lab, i learn how to use coding to make pyglatin words.

Code

pyg = ‘ay’

original = raw_input(‘Enter a word:’)
word = original.lower()
first = word[0]
if first in “aeiou”:
print word + pyg
else:
new_word = word[1:] + word[0] + pyg
print new_word

Screenshot

 

Screenshot (7)

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *