d = { "apples": 4, "pears": 7, "guavas": 23}

for item in d:
    print("Piece of produce:", item)
    print("I have this many:", d[item])

print("---------")

def makeTotal(d):
    total = 0
    for item in d:
        total = total + d[item]
        print("Item:", item)
    return total

print("Total:", makeTotal(d))

print("---------")

def alphabet(words):
    d = { }
    for word in words:
        first = word[0]
        if first not in d:
            d[first] = [word]
        else:
            d[first].append(word)
    return d

print(alphabet(["apple", "hello", "axe", "dog"]))