questions = [
    {
        "question": "What is the capital of France?",
        "choices": ["Paris", "London", "Berlin", "Madrid"],
        "answer": "Paris"
    },
    {
        "question": "What is the largest prime number?",
        "choices": ["2", "3", "5", "7"],
        "answer": "2"
    },
     {
        "question": "What is the name of the river that runs through Egypt?",
        "choices": ["Nile River", "Senegal River", "Niger River", "Amzon River"],
        "answer": "Nile River"
    },
     {
        "question": "What is the name of the highest mountain in the world?",
        "choices": ["Mount Everest", "Mount Kilimanjaro", "Mount Fuji", "Mount Makale"],
        "answer": "Mount Everest"
    },
      {
        "question": "What is the name of the country in which the city of Mecca is located?",
        "choices": ["Egypt", "Saudi Arabia", "Syria", "Jordan"],
        "answer": "Saudi Arabia"
    },
]



num_questions = 5



import random

random_questions = random.sample(questions, num_questions)

for question in random_questions:
    print(question["question"])
    for i, choice in enumerate(question["choices"]):
        print(f"{i + 1}: {choice}")

  
    answer = input("Enter answer number: ")

   
    if question["choices"][int(answer) - 1] == question["answer"]:
        print("The answer is correct!")
    else:
        print("The answer is wrong. The correct answer is: " + question["answer"])



score = 0
for question in random_questions:
    if question["choices"][int(answer) - 1] == question["answer"]:
        score += 1

print(f"You got {score} from {num_questions}")

