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

 

konstans@stuy.edu all > pigLatin
prev  |  next  |  chance

Pig Latin: Given a single word of at least 1 character. words that start with a,e,i,o,u -> add 'hay' to the end of the word words that start with any digraph (list included for your convenience) move the first two letters to the end, and add 'ay' other words, move the first letter to the end, and add 'ay' to the word. Digraphs: ['bl', 'br', 'ch', 'ck', 'cl', 'cr', 'dr', 'fl', 'fr', 'gh', 'gl', 'gr', 'ng', 'ph', 'pl', 'pr', 'qu', 'sc', 'sh', 'sk', 'sl', 'sm', 'sn', 'sp', 'st', 'sw', 'th', 'tr', 'tw', 'wh', 'wr']


pigLatin('f') → 'fay'
pigLatin('i') → 'ihay'
pigLatin('the') → 'ethay'

...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

Copyright Nick Parlante 2017 - privacy