InfoDb = []

# InfoDB is a data structure with expected Keys and Values

# Append to List a Dictionary of key/values related to a person and cars
InfoDb.append({
    "FirstName": "John",
    "LastName": "Mortensen",
    "DOB": "October 21",
    "Residence": "San Diego",
    "Email": "jmortensen@powayusd.com",
    "Owns_Cars": ["2015-Fusion", "2011-Ranger", "2003-Excursion", "1997-F350", "1969-Cadillac"]
})

# Append to List a 2nd Dictionary of key/values
InfoDb.append({
    "FirstName": "Sunny",
    "LastName": "Naidu",
    "DOB": "August 2",
    "Residence": "Temecula",
    "Email": "snaidu@powayusd.com",
    "Owns_Cars": ["4Runner"]
})

InfoDb.append({
    "FirstName": "Advay",
    "LastName": "Shindikar",
    "DOB": "December 16",
    "Residence": "San Diego",
    "Email": "advay1216@gmail.com",
    "Owns_Cars": ["Porsche 911"]
})

# Print the data structure
print(InfoDb)
x = len(InfoDb)
print(x)
[{'FirstName': 'John', 'LastName': 'Mortensen', 'DOB': 'October 21', 'Residence': 'San Diego', 'Email': 'jmortensen@powayusd.com', 'Owns_Cars': ['2015-Fusion', '2011-Ranger', '2003-Excursion', '1997-F350', '1969-Cadillac']}, {'FirstName': 'Sunny', 'LastName': 'Naidu', 'DOB': 'August 2', 'Residence': 'Temecula', 'Email': 'snaidu@powayusd.com', 'Owns_Cars': ['4Runner']}, {'FirstName': 'Advay', 'LastName': 'Shindikar', 'DOB': 'December 16', 'Residence': 'San Diego', 'Email': 'advay1216@gmail.com', 'Owns_Cars': ['Porsche 911']}]
3
x = len(InfoDb)
print(x)
i = 0
def print_data(d_rec):
    print(d_rec["FirstName"], d_rec["LastName"])  # using comma puts space between values
    print("\t", "Residence:", d_rec["Residence"]) # \t is a tab indent
    print("\t", "Birth Day:", d_rec["DOB"])
    print("\t", "Cars: ", end="")  # end="" make sure no return occurs
    print(", ".join(d_rec["Owns_Cars"]))  # join allows printing a string list with separator
    print()
for i in range (x):
    record = InfoDb[i]
    print_data(record)
    i += 1 
3
John Mortensen
	 Residence: San Diego
	 Birth Day: October 21
	 Cars: 2015-Fusion, 2011-Ranger, 2003-Excursion, 1997-F350, 1969-Cadillac

Sunny Naidu
	 Residence: Temecula
	 Birth Day: August 2
	 Cars: 4Runner

Advay Shindikar
	 Residence: San Diego
	 Birth Day: December 16
	 Cars: Porsche 911

QuizDb = []
QuizDb.append({
    "Q1": "Who won the 2021-2022 Premier League Title?",
    "A1": "Manchester City",
    "Q2": "Which Premier League team has won the most titles?",
    "A2": "Manchester United",
    "Q3": "Who is the all time leading scorer in the Premier League?",
    "A3": "Alan Shearer",
    "Q4": "Who is the most successful Premier League Manager?",
    "A4": "Sir Alex Ferguson",
    "Q5": "How many teams play in the Premier League?",
    "A5": "20",
    "Q6": "How many teams are relegated each year?",
    "A6": "3",
    "Q7": "When was the premier league officially founded?",
    "A7": "1992"
   
})

def quiz():
    f = 1
    score = 0
    while f <= 7:
        answer = input(QuizDb [0]["Q"+str(f)])
        if answer == QuizDb[0]["A"+str(f)]:
            print ("correct")
            score += 1
        else: 
            print("incorrect")
        f +=1
    print("You Recieved", 100*(score/7), "%")
quiz()
correct
You Recieved 14.285714285714285 %
correct
You Recieved 28.57142857142857 %
correct
You Recieved 42.857142857142854 %
correct
You Recieved 57.14285714285714 %
correct
You Recieved 71.42857142857143 %
correct
You Recieved 85.71428571428571 %
correct
You Recieved 100.0 %