-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython.py
More file actions
70 lines (50 loc) · 2.03 KB
/
python.py
File metadata and controls
70 lines (50 loc) · 2.03 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
63
64
65
66
67
68
69
#in python else can be used in forloop and whileloop too.
#for i in range(1):
# print("you have range ")
#else:
# print("you donot have range")
#
#for i in range (4) :
# if i==2:
# break;
# print(i)
#else:
# print('unchocky')
ques1=["what is the capital city of nepal?","1.lalitpur",'2.kathmandu',"3.pokhara","4.bhaktapur"]
ques2=["what is the condition whwn we try to push elements in stack although it is full?","1.stack underflow","2.stack overflow","3.both","4.none"]
ques3=["8848 microprocessor consists of how many pins?","1.20 pins","2.39pins","3.19pins","4.40pins"]
print("what is the capital city of nepal?\n 1.lalitpur\t\t\t2.kathmandu\n3.pokhara\t\t\t4.bhaktapur")
b=int(input("choose a number between 1 and 4"))
cash=[1000,2000,3000,10000,20000,50000,320000]
match(b):
case 1:
if(ques1[1]):
print("you have choosen wrong answer ")
print("you are out of game")
case 2:
if(ques1[2]):
print("you have choosen right answer")
print("you have won rs.1000")
case 3:
if(ques1[3]) :
print("you have choosen wrong answer")
print("ypu are out of game")
case 4:
if(ques1[4]) :
print("you have choosen wrong answer")
print("you are out of the game")
case _ : #default
print("out of scope,please enter a number within range between 1 and 4")
questions=[
["what is the capital of nepal","kathmandu","pokhara","biratnagar","bhaktapur"],
["how many pins are there in microprocessor 8848","19","40","20","39"],
["what is a chromatic number of c6","2","3","6","4"],
["what is the symbol of conjuction","^","<",">","^^"]
]
levels=[1000,2000,3000,10000,40000,100000,300000]
for i in range(0,len(questions)):
print(f"{questions[i]}\n1.{questions[i][0]}\t\t ")
def welcome():
print("you are warm welcome")
if __name__=="__python__":
welcome()