import random

# Quiz questions with answers
quiz = {
    "What is the capital of Saudi Arabia?": {
        "A": "Riyadh",
        "B": "Makkah",
        "C": "Madinah",
        "D": "Jeddah",
        "correct": "A"
    },
    "What is the largest ocean on Earth?": {
        "A": "Indian Ocean",
        "B": "Atlantic Ocean",
        "C": "Arctic Ocean",
        "D": "Pacific Ocean",
        "correct": "D"
    },
    "What is the largest ocean on Earth?": {
        "A": "Indian Ocean",
        "B": "Atlantic Ocean",
        "C": "Arctic Ocean",
        "D": "Pacific Ocean",
        "correct": "D"
    },
    "Which country is known as the (Land of the Rising Sun)?": {
        "A": "China",
        "B": "South Korea",
        "C": "Japan",
        "D": "Thailand",
        "correct": "C"
    },
    "Who painted the famous artwork (The Starry Night)?": {
        "A": "Pablo Picasso",
        "B": "Vincent van Gogh",
        "C": "Leonardo da Vinci",
        "D": "Claude Monet",
        "correct": "B"
    },
    "What is the largest mammal in the world?": {
        "A": "Elephant",
        "B": "Blue whale",
        "C": "Giraffe",
        "D": "Lion",
        "correct": "B"
    },
    "What is the chemical symbol for gold?": {
        "A": "Au",
        "B": "Ag",
        "C": "Cu",
        "D": "Fe",
        "correct": "A"
    },
    "What is the largest organ in the human body?": {
        "A": "Liver",
        "B": "Skin",
        "C": "Heart",
        "D": "Brain",
        "correct": "B"
    },
    "Which of the following is a primary color?": {
        "A": "Purple",
        "B": "Green",
        "C": "Orange",
        "D": "Blue",
        "correct": "D"
    },
    "What is the tallest mountain in the world?": {
        "A": "Mount Kilimanjaro",
        "B": "Mount Everest",
        "C": "K2",
        "D": "Mount Fuji",
        "correct": "B"
    },
    # Add more questions here if you want
}

def run_quiz(quiz, num_questions):
    questions = random.sample(list(quiz.keys()), num_questions)
    score = 0
    
    for question in questions:
        print(question)
        choices = quiz[question]
        for choice, answer in choices.items():
            if choice != "correct":
                print(f"{choice}: {answer}")
        
        player_answer = input("Your answer: ").upper()
        
        if player_answer == choices["correct"]:
            print("Correct!\n")
            score += 1
        else:
            print("Incorrect!\n")
    
    print(f"Quiz completed! Your score: {score}/{num_questions}")

if __name__ == "__main__":
    num_questions = 9  # Number of questions for the quiz
    run_quiz(quiz, num_questions)