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

 

pais@kinetigram.com recursion01 > R12_changePi
prev  |  next  |  chance

APCS Recursion 1, Problem 2. Given a string, compute recursively (no loops) a new string where all appearances of "pi" have been replaced by "3.14".


R12_changePi("xpix") → "x3.14x"
R12_changePi("pipi") → "3.143.14"
R12_changePi("pip") → "3.14p"

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

public String R12_changePi(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: 300 Post-solution available

Copyright Nick Parlante 2017 - privacy