about | help | code help+videos | done | prefs |
Write a method called mark that gets a string and a character, and returns a new string. This method marks the given character inside the given string by adding parenthesis around it e.g. mark("heLlo", 'l') --> he(L)(l)o Also, overload the method so it can accept one strings and a key as an int type e.g. mark("hello3", 3) --> hello(3) mark("er1t", 1) → "er(1)t" mark("2abc", 2) → "(2)abc" mark("This is a test", "t") → "(T)his is a (t)es(t)" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 160
Copyright Nick Parlante 2017 - privacy