-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquiz_game
More file actions
43 lines (31 loc) · 836 Bytes
/
quiz_game
File metadata and controls
43 lines (31 loc) · 836 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
print("Welcome to game center.")
playing = input("Do want to play? : ")
if(playing.lower() != "yes"):
quit()
print("Well, then let's start the game.")
score = 0
answer = input("What is the easiest programming language to learn : ")
if(answer == ""):
print("Enter a valid answer...")
quit()
if(answer.lower() != "python"):
print("Wrong.")
score = score - 1
else:
print("Correct.")
score = score +1
answer = input("what is ML stands for?: ")
if(answer.lower() != "machine learning"):
print("Wrong.")
score = score -1
else:
print("Correct.")
score = score +1
answer = input("what is IOT stands for?: ")
if(answer.lower() != "internet of things"):
print("Wrong.")
score = score - 1
else:
print("Correct.")
score = score +1
print(f"your total score is : {score} ")