people = {}
done = False
while not done:
    name = input('Enter your name: ')
    age = input('Enter your age: ')
    people[name] = age
    doneyet = input('Are there more people [y/n]: ')
    if doneyet == 'n':
        done = True

def get_people(dict):
    response = ''
    for person in dict:
        response += 'Name: ' + person + ', Age: ' + dict[person] + ' \n'
    return response

def get_oldest_person(dict):
    oldest_person = ''
    oldest_age = 0
    for person in dict:
        if int(dict[person]) > oldest_age:
            oldest_age = int(dict[person])
            oldest_person = person
    return oldest_person

print('All people: \n' + get_people(people))
print('\n Oldest Person: ' + get_oldest_person(people))
All people: 
Name: Ian, Age: 15 
Name: Trevor, Age: 15 
Name: Jack, Age: 32 


 Oldest Person: Jack
secretNumber = 15
print(secretNumber)
## secretNumber is an Integer
print(isinstance(secretNumber, int))

food = "Pizza"
print(food)
## food is a string
print(isinstance(food, str))

names = ["Nandan", "Arnav", "Torin", "Remy"]
print(names)
## names is an array, each element of names is a string
print(isinstance(names, list))

IamCool = True

print(IamCool)
## IamCool is a boolean
print(isinstance(IamCool, bool))

##Bonus Problem:

names_2 = {
    "Nandan": "TeamMate1",
    "Arnav": "TeamMate2",
    "Torin": "TeamMate3",
    "Remy": "TeamMate4",
}

print(names_2)
## name_2 is a dictionary, each key in the dictionary is a string, each value in the dictionary is also a string
print(isinstance(names_2, dict))


15
True
Pizza
True
['Nandan', 'Arnav', 'Torin', 'Remy']
True
True
True
{'Nandan': 'TeamMate1', 'Arnav': 'TeamMate2', 'Torin': 'TeamMate3', 'Remy': 'TeamMate4'}
True
import random
## usage of dictionary to store state abbreviations
stateAbr = {
    "California": "CA",
    "Nevada": "NV",
    "Alaska": "AK",
    "Hawaii": "HI",
    "Arizona": "AZ"
}
# usage of integer to store score
score = 0
# usage of boolean
done = False
# using arrays here even though a dictionary would be better
states = ['California', 'Nevada', 'Alaska', 'Hawaii', 'Arizona']
capitals = ['Sacramento', 'Carson City', 'Juneau', 'Honolulu', 'Phoenix']

# prompt user with question
def promptUser():
    state = random.randint(0, len(states) - 1)
    a = input('What is the capital of ' + states[state])
    return [a, state]

while not done:
    guess = promptUser()
    # check if answer is correct
    if guess[0] == capitals[guess[1]]:
        print('Correct! The capital of ' + stateAbr[states[guess[1]]] + " is " + capitals[guess[1]] + "!")
        score += 1
    else:
        print('I am sorry, the capital of ' + stateAbr[states[guess[1]]] + " is " + capitals[guess[1]] + '.')
    doneyet = input('Do you want to continue [y/n]: ')
    # exit if user is finished
    if doneyet == 'n':
        done = True

# print score
print('Congratulations, your score is ' + str(score) + '!')
Correct! The capital of AZ is Phoenix!
Correct! The capital of CA is Sacramento!
I am sorry, the capital of NV is Carson City.
Correct! The capital of AZ is Phoenix!
Congratulations, your score is 3!