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

 

ratRemoval


If the given word has a "rat" in it, exterminate it (replace "rat" with "x").
Note: the given word will have at most one "rat".

Credit: A.Baxley, BHS, 2022


ratRemoval("quadratic") → "quadxic"
ratRemoval("karate") → "kaxe"
ratRemoval("cheese") → "cheese"

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

public String ratRemoval(String 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

Java Help

Misc Code Practice

Difficulty: 100

Copyright Nick Parlante 2017 - privacy