-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquiz-game.py
45 lines (34 loc) · 1.08 KB
/
quiz-game.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
45
print("Welcome to Shivang's Computer Quiz!")
playing = input("Would You like to play this Informative Game? ").lower()
if playing != 'yes':
quit()
print("Welcome to my Quiz Game! let's play:)")
name = input("To start off : what is your name? ")
print(f"welcome {name}, make sure to check out the github repository for more quizzes")
score = 0
Question_1 = input("What does CPU stand for? ")
if Question_1.lower() == "central processing unit":
print("correct ")
score += 1
else:
print("incorrect ")
Question_2 = input("What does RAM stand for? ")
if Question_2.lower() == "random access memory":
print("correct ")
score += 1
else:
print("incorrect ")
Question_3 = input("What does GB stand for? ")
if Question_3.lower() == "gigabyte":
print("correct ")
score += 1
else:
print("incorrect ")
Question_4 = input("What does GPU stand for? ")
if Question_4.lower() == "graphics processing unit":
print("correct ")
score += 1
else:
print("incorrect ")
print("you got " + str(score) + " questions correct!")
print("you got " + str((score/4)*100) + "%.")