about | help | code help+videos | done | prefs |
Write a method that accepts 'pos' as a position in a string, with pos=1 representing the first character in the string (not the zeroth), and 'str' which is the string to consider. If 'pos' is past the end of the string, return -1 as an error code. Otherwise return how many characters remain in the string AFTER position 'pos'. As always, look at the test data for examples. Sept13_2019_P1SLHL_remaining(20, "The most powerful Jedi we have ever seen on screen... is a Muppet!") → 46 Sept13_2019_P1SLHL_remaining(5, "run for the hills...") → 15 Sept13_2019_P1SLHL_remaining(2, "yes, base problems are funny for noobs to try!") → 44 ...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: 280
Copyright Nick Parlante 2017 - privacy