Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions quiz_game.py
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
print("Welcome to my computer quiz!")
print("Welcome to my computer quiz! 🙌")

playing = input("Do you want to play? ")

playing = input("Do you want to play? 🧐 ")

if playing.lower() != "yes":
quit()

print("Okay! Let's play :)")
print("Okay! Let's play 🤩")
score = 0

answer = input("What does CPU stand for? ")
if answer.lower() == "central processing unit":
print('Correct!')
print('Correct!🥳')
score += 1
else:
print("Incorrect!")
print("Incorrect!😥")

answer = input("What does GPU stand for? ")
if answer.lower() == "graphics processing unit":
print('Correct!')
print('Correct!🥳')
score += 1
else:
print("Incorrect!")
print("Incorrect!😥")

answer = input("What does RAM stand for? ")
if answer.lower() == "random access memory":
print('Correct!')
print('Correct!🥳')
score += 1
else:
print("Incorrect!")
print("Incorrect!😥")

answer = input("What does PSU stand for? ")
if answer.lower() == "power supply":
print('Correct!')
print('Correct!🥳')
score += 1
else:
print("Incorrect!")
print("Incorrect!😥")

print("You got " + str(score) + " questions correct!")
print("You got " + str((score / 4) * 100) + "%.")
print("You got " + str(score) + " questions correct! 😎")
print("You got " + str((score / 4) * 100) + "%. 🤩")