Answer :
Answer:
The original program is not given; So, I'll just write the program myself in python
import random
x = random.randint(1,10)
y = random.randint(1,10)
result = x * y
print(str(y)+" * "+str(x)+" = "+str(result))
Explanation:
The first line imports random
import random
The next two line generates random numbers between 1 and 10 and save in variables x and y
x = random.randint(1,10)
y = random.randint(1,10)
This line multiplies both numbers
result = x * y
This line prints the result
print(str(y)+" * "+str(x)+" = "+str(result))
The modified program written in python 3 is given below :
- import random
- # import the random module for generating random numbers
- a = random.randint(1, 11)
- #a random integer value between the values (1 and 10) is attached to variable a
- b = random.randint(1,11)
- #a random integer value between the values (1 and 10) is attached to variable b
- answer = a * b
- # multiplies the value of a and b and attach the result to the variable answer
- print(str(a) + " * " + str(b) + " = " + str(answer))
- #displays the operation and result obtained as a string.
Learn more on python programs :https://brainly.com/question/16674303