def Python_Quiz(prompt):
    global word
    print ("Question: " + prompt)
    word = input()
    return word

questions_number = 4
correct_answer = 0

print("Hello, you will now be answering " + str(questions_number) + " questions")

My_Quiz = [{
    "How many states are in the United States of America?": "50",
    "What is the absolute value of 9?": "9",
    "What is the first colour in a rainbow?": "red",
    "What is the 21st letter of the alphabet?": "u",
}]
# My_Quiz.append({
#     "How many states are in the United States of America?": "50",
#     "What is the absolute value of 9?": "9",
#     "What is the first colour in a rainbow?": "red",
#     "What is the 21st letter of the alphabet?": "u",
# })

for dict in My_Quiz:
    for questions, answers in dict.items():
        Python_Quiz(questions)
        if word == answers:
            print("That is correct")
            correct_answer += 1
        else:
            print("That is incorrect")

print("You answered " + str(correct_answer) + " out of " + str(questions_number)+ " questions correctly")
Hello, you will now be answering 4 questions
Question: How many states are in the United States of America?
That is correct
Question: What is the absolute value of 9?
That is incorrect
Question: What is the first colour in a rainbow?
That is correct
Question: What is the 21st letter of the alphabet?
That is correct
You answered 3 out of 4 questions correctly