about | help | code help+videos | done | prefs |
Write the method called “averageLetters”. This method receives a string and returns an integer of the average number of letters in the given string of words. Given: I Love Java – this would return 3 (9 letters divided by 3 words) We will assume the words are separated by just one space... No beginning space character, but an ending space character. averageLetters("I Love Java ") → 3 averageLetters("Math Is For Champions ") → 4 averageLetters("What a good day ") → 3 ...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: 110
Copyright Nick Parlante 2017 - privacy