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

 

david.white@denison.edu cs111fall2019 > txtHelp
prev  |  next  |  chance

Write a function txtHelp(txt) that returns an expanded version of the string txt, which may contain texting abbreviations like "brb" and "lol." Your function should expand "brb" to "be right back", "lol" to "laugh out loud", "u" to "you", and "r" to "are". Notice that if an r appears in the middle of a word you should NOT expand it to "are". You may assume all abbreviations and their replacements are lowercase.


txtHelp('lol, cat pictures are hilarious!') → 'laugh out loud, cat pictures are hilarious!'
txtHelp('just saw a cat pic, brb, gotta check this out') → 'just saw a cat pic, be right back, gotta check this out'
txtHelp('u r awesome') → 'you are awesome'

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

def txtHelp(txt):

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