def letters_dict(word):
    """Function to put in a dictionary how many times a letter appears in the word.
    Args:
        word (str): the word we want to class
    Returns:
        dict: the dictionary that contains how many times each letter appears
        in the word
    """
    dictio = {}
    for letter in word:
        # If the letter is already in the dictionary, adds 1 to its value
        if letter in dictio.keys():
            dictio[letter] += 1
        # If not, add the letter as a new key and 1 as its value
        else:
            dictio[letter] = 1
    return dictio