Multiplication Exercise

  1. 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.
  2. Write a Python program to randomly geneate two integers m1 and m2, where m1 and m2 are among 0 .. 99.
  3. Ask the user to (mentally) calculate the multiplication of m1 and m2.
  4. 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