-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquiz.py
More file actions
34 lines (34 loc) · 922 Bytes
/
Copy pathquiz.py
File metadata and controls
34 lines (34 loc) · 922 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
print("welcome quiz game")
playing = input("do you want to play? ")
print(playing)
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() == "graphics 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!")
answer = input("what does rom stand for? ")
if answer.lower() == "read only memory":
print("correct!")
score += 1
else:
print("incorrect!")
print("you got " + str(score) + " questions correct!")
print("you got " + str((score / 4) * 100) + "%.")
print("thanks for playing!")