def count_uppercase(s: str) -> int:
    """Return the number of uppercase letters in s.
    
    >>> count_uppercase('aPpLe')
    2

    """
    # Accumulator pattern
    num_uppercase = 0
    
    for ch in s:
        if ch.isupper():
            num_uppercase += 1 # same as num_uppercase = num_uppercase + 1
    
    return num_uppercase
        


def all_fluffy(s: str) -> bool:
    """Return True iff every character in s is fluffy. Fluffy characters are those
    that appear in the word 'fluffy'.

    >>> all_fluffy('fluufffllyy')
    True
    >>> all_fluffy('orange')
    False
    """
    
    # This is a search pattern example
    
    for char in s:
        if not (char in 'fluffy'):
        # if char not in 'fluffy':
            return False
    return True
            

# didn't finish this one in lecture
def add_underscores(s: str) -> str:
    """Return a string that contains the characters from s with an underscore added
    after every character except the last.

    >>> add_underscores("hello")
    'h_e_l_l_o'
    """

    # This is an accumulator type problem

    result = ""
    
    for ch in s:
        result = result + ch + "_"
       
    # return our accumulator variable, removing the last underscore
    return result[:-1]
