wordList = [ "Hello", "World" ]
for word in wordList:
    print(word + "!")

###

d = { "today" : "Friday", "tomorrow" : "Saturday" }
for day in d:
    print("Day", day)
    print("Weekday", d[day])

###
    
"""
You do: write the function countItems(foodCounts)
that takes a dictionary mapping foods (strings) to
counts (integers), loops over the key-value pairs,
and returns the total amount of food stored in the
dictionary. The function should also print the number
of each individual food type as it counts up the total.

For example, if d = { "apples" : 5, "beets" : 2, "lemons" : 1 },
the function might print

5 apples
2 beets
1 lemons

then return 8.
"""

def countItems(foodCounts):
    result = 0
    for food in foodCounts:
        result = result + foodCounts[food]
        print(foodCounts[food], food)
    return result

d = { "apples" : 5, "beets" : 2, "lemons" : 1 }
print(countItems(d))

###

def countByCollege(studentData):
    collegeInfo = { }
    for studentInfo in studentData:
        student = studentInfo[0]
        college = studentInfo[1]
        if college not in collegeInfo:
            collegeInfo[college] = 0
        collegeInfo[college] = collegeInfo[college] + 1
    return collegeInfo

print(countByCollege([ ["erhurst" ,"CIT"],
                       ["neerajsa","SCS"],
                       ["cosorio","DC"],
                       ["dtoussai", "CIT"]]))