Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- def multi_practice():
- multi_table_input = input("Enter multiplicaiton table: ")
- number_of_questions_input = input ("Enter number of questions")
- multi_table = int(multi_table_input)
- number_of_questions =int(number_of_questions_input)
- i = 1
- while i <= number_of_questions:
- multiplier = random.randint(1, 10)
- print("What is " + str(multi_table) + " * " + str(multiplier))
- k = input("Enter answer: ")
- print("Correct answer is: " + str (multiplier * multi_table))
- i += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement