[Python] Pig Latin Translator 02-02-2014, 03:38 PM
#1
Hey guys,
I'm pretty new to Python so I wanted to share my very first creation!
I'd love to hear any feedback!!!
Thanks,
Sparks
I'm pretty new to Python so I wanted to share my very first creation!
Code:
pyg = 'ay'
word = original.lower()
first = original[0]
new_word = original + pyg
original = raw_input('Enter a word:')
if len(original) > 0 and original.isalpha():
if first == 'a' or first == 'e' or first == 'i' or first == 'o' or first == 'u':
print 'Translated: ' + new_word
else:
new_word = original[1:] + original[0] + pyg
print new_word
else:
print 'You didn\'t type anything!!'I'd love to hear any feedback!!!
Thanks,
Sparks














![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)



![[Image: BXqGARG.png]](https://i.imgur.com/BXqGARG.png)

![[Image: b3f0a97bdadd6fe3f12f4c4e28584085_zpsbfbc8c42.png]](http://i1237.photobucket.com/albums/ff475/purphexyon/b3f0a97bdadd6fe3f12f4c4e28584085_zpsbfbc8c42.png)













![[Image: F4Z9Dqw.png]](https://i.imgur.com/F4Z9Dqw.png)