about | help | code help+videos | done | prefs |
Define a function that when passed a character (say, ch) and an integer (say, n), returns a String containing the character occurring 1 to n times, each time separated by a dot. Examples: ch = '*', n=3 -> return "*.**.***" ch='$', n=4 -> return "$.$$.$$$.$$$$" pattern('*', 3) → '*.**.***' pattern('$', 4) → '$.$$.$$$.$$$$' pattern('5', 2) → '5.55' ...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: 2 Post-solution available
Copyright Nick Parlante 2017 - privacy