import random

print("\n","     ", " " * 10, "GENERAL KNOWLEDGE QUIZ ", " " * 10)
questions = (
    "What is the capital of France?",
    "Who wrote 'To Kill a Mockingbird'?",
    "Which planet is known as the Red Planet?",
    "What is the chemical symbol for water?",
    "Who painted the Mona Lisa?",
    "What is the largest mammal in the world?",
    "Which country is known as the Land of the Rising Sun?",
    "Who developed the theory of relativity?",
    "What is the currency of Japan?",
    "Which element is diamond made of?",
    "Who is known as the father of modern physics?",
    "What is the tallest mountain in the world?",
    "Which country is famous for its tulips?",
    "Who discovered penicillin?",
    "What is the hardest natural substance on Earth?",
    "Which language is spoken in Brazil?",
    "What is the largest ocean on Earth?",
    "Who wrote 'Romeo and Juliet'?",
    "What is the chemical symbol for gold?",
    "Which animal is known as the 'King of the Jungle'?"
)

options = (
    ("A. London", "B. Paris", "C. Rome", "D. Berlin"),
    ("A. J.K. Rowling", "B. Harper Lee", "C. George Orwell", "D. William Shakespeare"),
    ("A. Venus", "B. Mars", "C. Jupiter", "D. Mercury"),
    ("A. H2O", "B. CO2", "C. O2", "D. NaCl"),
    ("A. Leonardo da Vinci", "B. Michelangelo", "C. Vincent van Gogh", "D. Pablo Picasso"),
    ("A. Elephant", "B. Blue Whale", "C. Giraffe", "D. Polar Bear"),
    ("A. China", "B. Japan", "C. South Korea", "D. Vietnam"),
    ("A. Albert Einstein", "B. Isaac Newton", "C. Galileo Galilei", "D. Johannes Kepler"),
    ("A. Yuan", "B. Won", "C. Yen", "D. Euro"),
    ("A. Carbon", "B. Oxygen", "C. Nitrogen", "D. Hydrogen"),
    ("A. Isaac Newton", "B. Albert Einstein", "C. Galileo Galilei", "D. Nicolaus Copernicus"),
    ("A. Mount Kilimanjaro", "B. Mount Everest", "C. Mount Fuji", "D. K2"),
    ("A. Turkey", "B. Netherlands", "C. Italy", "D. France"),
    ("A. Alexander Fleming", "B. Louis Pasteur", "C. Marie Curie", "D. Thomas Edison"),
    ("A. Iron", "B. Diamond", "C. Titanium", "D. Quartz"),
    ("A. Spanish", "B. Portuguese", "C. English", "D. French"),
    ("A. Atlantic Ocean", "B. Indian Ocean", "C. Pacific Ocean", "D. Arctic Ocean"),
    ("A. William Shakespeare", "B. Charles Dickens", "C. Mark Twain", "D. Jane Austen"),
    ("A. G", "B. Au", "C. Ag", "D. Fe"),
    ("A. Lion", "B. Tiger", "C. Elephant", "D. Giraffe")
)

answers = (
    "B", "B", "B", "A", "A",
    "B", "B", "A", "C", "A",
    "B", "B", "B", "A", "B",
    "B", "C", "A", "B", "A"
)

guesses = []
score = 0
question_indices = random.sample(range(len(questions)), 5)

for index in question_indices:
    question_num = index
    print("\n","     ", "_" * 45)
    print("\n","   Q:", questions[question_num])

    for option in options[question_num]:
        print("\n","     ", option)

    guess = input("\n      Enter (A, B, C, D): ").upper()
    guesses.append(guess)
    if guess == answers[question_num]:
        score += 1
        print("\n         Correct!")
    else:
        print("\n         INCORRECT :(")
        print(f"         The answer is: {answers[question_num]}")

print("     ","_" * 45)
print("    \n                      QUIZ COMPLETED!        ")
print("     ","_" * 45)

print("\n       Your answers: ", end="")
for guess in guesses:
    print(guess, end="  ")
print()

print("\n       Correct answers: ", end="")
for index in question_indices:
    print(answers[index],end="  ")
print()

score = int(score / len(question_indices) * 10)
print(f"\n       Your score is: {score}/10")