Skip to content

Commit f91e2b4

Browse files
authored
Update kbc.py
1 parent 1ac2272 commit f91e2b4

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

Codes_in_jan2024/kbc.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
1-
qns = ["q1: 3 + 5 =","q2: 4 * 5 =","q3: 9 / 3 ="]
1+
qns = ["q1: 3 + 5 =","q2: 4 * 5 =","q3: 9 / 3 ="]
2+
score = 0
23
print(qns[0])
34
a = int(input("ENTER ANSWER:"))
45
match a:
56
case _ if a == 8:
6-
print("RIGHT")
7+
print("RIGHT")
8+
score += 1
79
case _:
810
print("WRONG")
911

1012
print(qns[1])
1113
b = int(input("ENTER ANSWER:"))
1214
match b:
1315
case _ if b == 20:
14-
print("RIGHT")
16+
print("RIGHT")
17+
score += 1
1518
case _:
1619
print("WRONG")
1720

1821
print(qns[2])
1922
c = int(input("ENTER ANSWER:"))
2023
match c:
2124
case _ if c == 3:
22-
print("RIGHT")
25+
print("RIGHT")
26+
score += 1
2327
case _:
2428
print("WRONG")

0 commit comments

Comments
 (0)