import random # variables rounds = 3 rounds_played = 0 game_history = [] print("you chose to play 3 rounds") while rounds_played < rounds: random_1 = random.randint(1, 12) random_2 = random.randint(1, 12) correct_answer = random_1 * random_2 print(f" {random_1} x {random_2} = ") history_item = f" {random_1} x {random_2} = {correct_answer}" game_history.append(history_item) rounds_played += 1 history = input("do you want to see the correct answers?").lower() if history == "yes": for item in game_history: print(item)