-
Notifications
You must be signed in to change notification settings - Fork 0
/
quizgame.py
44 lines (36 loc) · 994 Bytes
/
quizgame.py
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
print("Welcome to the Quiz!!")
playing = input("Do you want to play? ")
if playing.upper() != "YES":
quit()
print("Okay! Let's play :) ")
score = 0
#Q1
answer = input("What does CPU stand for? ")
if answer.upper() == "CENTRAL PROCESSING UNIT":
print("Correct! Answer")
score += 1
else:
print("Incorrect!")
#Q2
answer = input("What does GPU stand for? ")
if answer.upper() == "GRAPHICS PROCESSING UNIT":
print("Correct! Answer")
score += 1
else:
print("Incorrect!")
#Q3
answer = input("What are 3 components of the Blockchain trilemma? (Answer in the alphabatical order) ")
if answer.upper() == "DECENTRALIZATION SCALABILITY SECURITY":
print("Correct! Answer")
score += 1
else:
print("Incorrect!")
#Q4
answer = input("What does RAM stand for? ")
if answer.upper() == "RANDOM ACCESS MEMORY":
print("Correct! Answer")
score += 1
else:
print("Incorrect!")
print(f'Your Score is {score} out of 4')
print(f'You secured {(score/4) * 100}%')