Lab 4: Pig Latin

Description:

This was a bit challenging. we had to use booleans to finish this.

code:

pyg = ‘ay’

original = raw_input(‘Enter a word:’)
word=original.lower()
first=word[0]
new_word=word[1:] + first + pyg

if len(original) > 0 and original.isalpha():
print original
else:
print ’empty’

 

screenshot:

codepic

Leave a Reply

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