Pyg Latin Testing!


#1

After completing this task I got the all clear and it said completed but I have a feeling I did it in a way that doesnt count

instead of making a word change I just added a word with ay at the end so Im not sure if its a direct pyg latin translator.

pyg = 'ay'
original = raw_input('Enter a word:')
new_word = "ommytay"

if len(original) > 0 and original.isalpha():

print original
word = original.lower()
first = word[0]

new_word[1:4]



else:
print "empty"

I'm unsure of the part where splicing the words and I think for some reason the Input of the new word and the variable I stored it in I've made some mistake.

I'd love to hear back any constructive criticisms anyone has be it on how I posted or the code itself as I'm learning!

Thanks,

Tommy


#2

PLEASE CHECK OUT MY CODE

I have made PIGLATIN...

#!/usr/bin/python

import sys

words = ((raw_input("Input Sentence:").lower()).split())
for word in words:
if word[0] in ['a','i','e','o','u']:
sys.stdout.write(word+"ay"+" ")
else:
sys.stdout.write(word[1:]+word[0]+"ay"+" ")