-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquiz_game.py
More file actions
41 lines (34 loc) · 993 Bytes
/
Copy pathquiz_game.py
File metadata and controls
41 lines (34 loc) · 993 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
33
34
35
36
37
38
39
40
41
print("Welcome to my computer quiz game !!")
playing = input("Do you want to play ?")
if playing.lower() == "yes":
print("okay! let's play")
else:
print("Too bad for you")
quit()
score = 0
answer = input("What does CPU stand for? ")
if answer.lower() == "central processing unit":
print("This is correct")
score +=1
else:
print("This is incorrect")
answer = input("What does RAM stand for? ")
if answer.lower() == "random access memory":
print("This is correct")
score +=1
else:
print("This is incorrect")
answer = input("What does ROM stand for? ")
if answer.lower() == "read only memory":
print("This is correct")
score +=1
else:
print("This is incorrect")
answer = input("What does BIOS stand for? ")
if answer.lower() == "basic input output processor":
print("This is correct")
score +=1
else:
print("This is incorrect")
print("You got " + str(+score) +" questions correct !!")
print("You got " + str((score/4)*100) + "%")