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

 

srp4379@lausd.net quiz4 > goodBad
prev  |  next  |  chance

String goodBad(String str): If the string starts or ends with "good", return a string with the letters "good" replaced by the letters "bad". If "good" does not appear in the string, just return the string unchanged.


goodBad("No good Yes") → "No good Yes"
goodBad("good old boy") → "bad old boy"
goodBad("dog is good") → "dog is bad"

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

String goodBad(String str) { }

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

Java Help

Misc Code Practice

Difficulty: 119

Copyright Nick Parlante 2017 - privacy