Multiplication Exercise
- After you import the random module,
you can use the function random.randint(a, b) to generate a random
integer N such that a <= N <= b.
- Write a Python program to randomly geneate two integers m1 and m2,
where m1 and m2 are among 0 .. 99.
- Ask the user to (mentally) calculate the multiplication of m1 and
m2.
- If the calculation is correct, praise the user.
If the calculation is incorrect, print out the correct answer.
The program may run as follows:
6 * 92 = 552
Right!
56 * 98 = 5538
Wrong! 56*98=5488