PY
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
import random
def generate():
haha = list()
for i in range (0,2):
haha.append(random.randrange(1,10,1))
tuple_val = tuple(haha)
return tuple_val
def test(n):
result = generate()
for i in range(len(result)):
j =result[i] * i
if n == j:
print(" Correct answer")
else:
print("try again")
return result
print("Find the multiplication of", generate())
print(" Enter your result below\n")
x = int(input())
test(x)
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run