about | help | code help+videos | done | prefs |
test2021_04_29_SLHL_insertSymbols
Write a method that returns a string representing an integer 'num' with the string 'str' inserted BETWEEN each digit of the number. Preconditions: 'num' will contain a positive integer and 'str' will contain a string (possibly an empty string). Return a string with the digits of 'num' with 'str' between each digit. If 'num' is a single-digit number, just return a string that represents that number since there are no spaces between digits in a single-digit number. test2021_04_29_SLHL_insertSymbols(124, ":::") → "1:::2:::4" test2021_04_29_SLHL_insertSymbols(21532, "^") → "2^1^5^3^2" test2021_04_29_SLHL_insertSymbols(4, "igloo") → "4" ...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: 250
Copyright Nick Parlante 2017 - privacy