about | help | code help+videos | done | prefs |
Write a method that returns the number of times that the character 'ltr' appears in the string 'str'. Note that the string could be an empty string, or otherwise not contain any copies of 'ltr' in which case you would return a zero. nov4_2016_APSLHL_countLetter("this is a test", "i") → 2 nov4_2016_APSLHL_countLetter("a whole lot of letter o can be found", "o") → 5 nov4_2016_APSLHL_countLetter("all good apes ate apples", "a") → 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: 240
Copyright Nick Parlante 2017 - privacy