0% found this document useful (0 votes)
5 views1 page

Video Game Trivia Quiz Script

This document is a simple trivia game about video games where the user answers three questions. The game tracks the user's score based on correct answers and provides feedback for each response. At the end, it displays the user's final score and a game over message.

Uploaded by

eric.xu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Video Game Trivia Quiz Script

This document is a simple trivia game about video games where the user answers three questions. The game tracks the user's score based on correct answers and provides feedback for each response. At the end, it displays the user's final score and a game over message.

Uploaded by

eric.xu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

#Cheng Xu Eric, this is a trivia about video games

name = input("Hello there! What is your name? ")


print(f"Okay {name}, are you ready to start answering some questions about video
games?")

score = 0

#questions / answers
questions = ["What is the most sold video game of all time? ", "What color is Sonic
the Hedgehog? ", "What is the final course in every Mario Kart game? "]
answers = ["minecraft", "blue", "rainbow road"]

#If statements
answer = input(questions[0] + "").lower()
if answer == answers[0]:
print("Correct!\n")
score += 1
else:
print("Wrong, the correct answer is minecraft!\n")

answer = input(questions[1] + "").lower()


if answer == answers[1]:
print("Correct!\n")
score += 1
else:
print("Wrong, the correct answer is blue!\n")

answer = input(questions[2] + "").lower()


if answer == answers[2]:
print("Correct!\n")
score += 1
else:
print("Wrong, the correct answer is rainbow road!\n")

#Summary
print(f"Game Over, {name}!")
print(f"Your final score is {score}!")

You might also like