id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

piglatin


An English word is translated into Pig Latin by the following rules: if the word starts with one or more consonants then they are moved to the end, and the letters "ay" are added to the end after the consonants. If the word starts with a vowel, then just add 'way' to the end. We will assume that 'y' is not a vowel.


piglatin('pig') → 'igpay'
piglatin('aardvark') → 'aardvarkway'
piglatin('scram') → 'amscray'

...Save, Compile, Run (ctrl-enter)

def piglatin(word):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 210 Post-solution available

Copyright Nick Parlante 2017 - privacy