def number_of_stutters(s):
    """
    What comes in:
      -- a string s
    What goes out: Returns the number of times a letter is repeated
      twice-in-a-row in the given string s.
    Side effects: None.
    Examples:
      -- number_of_stutters('xhhbrrs')  returns 2
      -- number_of_stutters('xxxx')     returns 3
      -- number_of_stutters('xaxaxa')   returns 0
      -- number_of_stutters('xxx yyy xxxx')  returns 7
      -- number_of_stutters('xxxyyyxxxx')    returns 7
      -- number_of_stutters('')  returns 0
    Type hints:
       :type s: str
    """
    # -------------------------------------------------------------------------
    # DONE: 4. Implement and test this function.
    #     The testing code is already written for you (above).
    # -------------------------------------------------------------------------
    count = 0
    for k in range( 1, len(s)):
        if s[k] == s[k - 1]:
            count = count + 1
    return count