Question: Write a function count_doubleletter(word) defined for a non-empty string word, which counts the number of double-letters in it (a double-letter is a letter which appears
Write a function count_doubleletter(word) defined for a non-empty string word, which counts the number of double-letters in it (a double-letter is a letter which appears consecutively in a word.) Thus, count_doubleletter('math') should return 0 count_doubleletter('coordinate') should return 1 count_doubleletter('Mississippi') should return 3 count_doubleletter('raccoon') should return 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
