-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path7_QuizGame.py
More file actions
62 lines (47 loc) · 1.38 KB
/
Copy path7_QuizGame.py
File metadata and controls
62 lines (47 loc) · 1.38 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
#project_7
#QuizGame
QueAns = {
"Which animal lays the largest egg:" : "C",
"How many bones are there in a human body":"D",
"What is the largest fish in earth":"A",
"which is a star from here":"B"
}
options =[
{"A":"Anaconda",
"B":"elephant",
"C":"Ostrich",
"D":"Giraffe"} ,
{"A":"119",
"B":"198",
"C":"267",
"D":"206"},
{"A":"Whale",
"B":"Salmon",
"C":"Tuna",
"D":"Puffer fish"
},
{"A":"Mercury",
"B":"Sun",
"C":"Moon",
"D":"Galaxy"}
]
#functioning
def func():
count = 0
Marks= 0
for eachQuestion in QueAns:
print(f"{count+1}.{eachQuestion}")
pick = input(f"pick one from here(only letters)\n {options[count]}:").upper()
if pick == QueAns[eachQuestion]:
Marks =Marks+2
print("congrats✨🤗!!",Marks,"out of 10")
else:
print("wrong❌",Marks,"out of 10")
count = count+1
while True:
print("==================Welcome to Quiz Gaame========================")
choice= input("wanna play(yes or no):").lower()
if choice == "yes":
func()
else:
print("bye!!!")