Record#
Today's practice is a math mini-game that uses a for loop to output math questions and calculates the final score.
CODE#
print("Math Game!")
print()
score = 0
n1 = int(input("Enter the number you want to practice: "))
for i in range(1, 11):
n0 = "{} * {} = ".format(i, n1)
n2 = int(input(n0))
if n2 == (i * n1):
print("Correct, great job.")
score += 1
else:
print("Oops, wrong answer. The correct answer is: ", i * n1)
print("Your score is: ", score, ".")