forked from karan/Projects
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Karan Goel
committed
Jul 11, 2013
1 parent
0626902
commit 7693d42
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
""" | ||
Pig Latin - Pig Latin is a game of alterations played | ||
on the English language game. To create the Pig Latin | ||
form of an English word the initial consonant sound is | ||
transposed to the end of the word and an ay is affixed | ||
(Ex.: "banana" would yield anana-bay). Read Wikipedia | ||
for more information on rules. | ||
""" | ||
|
||
word = raw_input('What\'s your word? ').lower() | ||
vowels = 'aeiou' | ||
|
||
pig = 'ay' | ||
|
||
first = word[0] | ||
|
||
if first in vowels: | ||
new = word + pig | ||
else: | ||
new = word[1:] + first + pig | ||
|
||
print new |