# Dictionary change, key !dup, values dup contact = { "firstName": "Philip", "lastName": "Matusiak", "age": 21, "VIPStatus": True } print( type(contact) ) #dict print(contact) # loop thru the entries for k, v in contact.items(): print(k, v) # list of keys in a dict contactKeys = list( contact.keys() ) # variable = create a list ( use contact and get keys ) print("Contact Keys: ", contactKeys) # create an empty set to hold our dictionary entries contacts = {} # Ask the user to input firstName, lastName, age and VIPStatus of a new contact # 4 inputs string, string, int, bool i_firstName = input("Enter the first name: ") i_lastName = input("Enter the last name: ") i_age = int(input("Enter the age of the contact: ")) # cast int from input # VIPStatus ## Set the default VIPStatus to False i_VIPStatus = False # dec bool and the default False ## Ask the user if they want to set the user as a vip i_yes = input("Do you want to set the user VIP status to yes? (Yes/No) ") ## Return the boolean based on an if statement if i_yes == "Yes": i_VIPStatus = True else: i_VIPStatus = False # Create a new contact in the dict contact = { "firstName": i_firstName, "lastName": i_lastName, "age": i_age, "VIPStatus": i_VIPStatus } # Add the entry to the contacts set contacts.update(contact) # method to update the set with a ne dict entry print("New contact added", contact) print("New contacts set:", contacts)