-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathQuiz_game.py
More file actions
32 lines (26 loc) · 773 Bytes
/
Quiz_game.py
File metadata and controls
32 lines (26 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
print("welcome to my quiz !")
playing = input("Do you want to play? ")
if playing.lower() != "yes":
quit()
print("Okay! Let's play :) ")
score = 0
answer = input("What does CPU stand for? ")
if answer.lower() == "central processing unit":
print('correct!')
score += 1
else :
print("Incorrect!")
answer = input("What does GPU stand for? ")
if answer.lower() == "graphic processing unit":
print('correct!')
score += 1
else :
print("Incorrect!")
answer = input("What does RAM stand for? ")
if answer.lower() == "random access memory":
print('correct!')
score += 1
else :
print("Incorrect!")
print("You got " + str(score) + " questions correct")
print("You got " + str((score / 3) * 100) + " %.")