from random import randint from time import time n =10 s = 0 input("Press enter when you're ready...") start_time = time() for i in range(0, n): a = randint(2, 12) b = randint(2, 12) print("what's", a, "*", b, "?") c = int(input()) if c == a*b: print("that's right") s = s + 1 else: print("nope it is", a*b) print() end_time = time() p = s/n*100 p = round(p) p = str(p) + '%' total_time = end_time - start_time time_per_question = total_time / n time_per_question = round(time_per_question, 2) print() print("you got", s, "out of", n, "or", p) print("you took", time_per_question, "seconds per question!!!")