-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathQuizGame.py
49 lines (40 loc) · 1.21 KB
/
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
45
46
47
48
49
print(" Welcome To My Quiz Game \n Interesting Game to Play")
Player = input(" Do you want to play the game? \n" )
if Player.lower() != 'yes':
print("Good Bye")
quit()
name_player = input("Enter Your Name: ")
print("Let's Start the Game :) ",name_player)
score = 0
answer = input(' What is CPU stands for? \n ')
if answer.lower() == 'central processing unit':
print("Correct")
score += 1
else:
print('Wrong')
answer = input(' What is GPU stands for? \n ')
if answer.lower() == 'graphical processing unit':
print("Correct")
score += 1
else:
print('Wrong')
answer = input(' What is RAM stands for? \n ')
if answer.lower() == 'random access memory':
print("Correct")
score += 1
else:
print('Wrong')
answer = input(' What is ROM stands for? \n ')
if answer.lower() == 'read only memory':
print("Correct")
score += 1
else:
print('Wrong')
answer = input(' Mouse is an input device or output device? \n ')
if answer.lower() == 'input device':
print("Correct")
score += 1
else:
print('Wrong')
print("You got the " + str(score)+ " correct answers")
print("You got the " + str((score/5) *100)+ " correct answers")