id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

countDoubles


x is a string. Complete the function so that it counts the number of times that two adjacent characters are the same.


countDoubles('follow eels') → 2
countDoubles('OOOOO') → 4
countDoubles('NoNoNoNo') → 0

...Save, Compile, Run (ctrl-enter)

def countDoubles( x ):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 150 Post-solution available

Copyright Nick Parlante 2017 - privacy