-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathComputer Quiz.py
More file actions
44 lines (35 loc) · 1009 Bytes
/
Computer Quiz.py
File metadata and controls
44 lines (35 loc) · 1009 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
42
43
44
#QUIZ GAME (easy)
print("Welcome to this computer quiz")
playing= input("Do you want to play? ")
if playing.lower() != "yes":
quit()
print("Let's play :D ")
print("Answers to be entered in ALL CAPS!")
score = 0
answer = input("1. What does CPU stand for? ")
if answer.upper() == "CENTRAL PROCESSING UNIT":
print("Correct!")
score+=1
else:
print("Incorrect!")
answer = input("2. What does GPU stand for? ")
if answer.upper() == "GRAPHICS PROCESSING UNIT":
print("Correct!")
score+=1
else:
print("Incorrect!")
answer = input("3. What does RAM stand for? ")
if answer.upper()== "RANDOM ACCESS MEMORY":
print("Correct!")
score+=1
else:
print("Incorrect!")
answer = input("4. What does PSU stand for? ")
if answer.upper() == "POWER SUPPLY":
print("Correct!")
score+=1
else:
print("Incorrect!")
print("\n")
print("You got " + str(score) + " questions correct")
print("You got " + str((score/4)*100) + "%")