Log in to save your progress.
<< Back to problems
OBS! Fönstret är för smalt för att använda pythonlabbet.se. Använd en enhet med tangentbord!

Practice the multiplication table

Prerequisites: Basic course part I

Time to practice multiplication! Your program first takes two integers as input, which multiplication table is desired (x) and then how many numbers (n) to practice. Randomly select n numbers from the multiplication table for x and print whether the user answered correctly or incorrectly (see example). Finish by printing how many numbers the user managed.

The user should be trained to multiply with a random number between 0 and 10 (inclusive, so 0 and 10 can be included).

Keep in mind that the output must be in exactly the same format (since the numbers are randomized, you will not see exactly the same calculations) as in the example for you to get it right.

Example input

7
3
28
15
7

Example output

4*7=
28 Correct
2*7=
15 Incorrect
1*7=
7 Correct
You managed 2 out of 3

Login to save your progress and your code.

Create

Write your code here.

-- Output from your program will be here --