import random

# Quiz questions and answers
quiz = [
    {
        "question": "What language is spoken in Austria ?",
        "choices": ["A. French languag", "B. German language", "C.English languag", "D. Italian languag"],
        "answer": "B"
    },
    {
        "question": "What is the capital of Germany?",
        "choices": ["A. Berlin", "B. Haiti", "C. Beijing","D.Accra "],
        "answer": "A"
    },
    {
        "question": "Who is the scientist who discovered protons?",
        "choices": ["A. Niels Boh", "B. Lev Landau", "C. Ernest Rutherford", "D. Hermann von Helmholtz"],
        "answer": "C"
    }
]

def play_quiz():
    score = 0
    random.shuffle(quiz)  # Randomly shuffle the quiz questions

    for question in quiz:
        print(question["question"])
        for choice in question["choices"]:
            print(choice)
        player_answer = input("Enter your answer (A, B, C, or D): ").upper()

        if player_answer == question["answer"]:
            print("Correct!")
            score += 1
        else:
            print("Incorrect!")

        print()

    print("Quiz complete!")
    print("Your score:", score, "/", len(quiz))

play_quiz()