xxxxxxxxxx
def multiply(num):
(num1 * num2)
num1 = random.randint(1,12)
num2 = random.randint(1,12)
if maths == "Multiplication" or "m" or "x":
ans = int(input("What is the answer to " + str(num1) + " x " + str(num2) + " ? "))
if ans == multiply(num1, num2):
print("You are correct! ")
else:
print("Wrong, please try again. ")
return num1 * num2
name = input("What is your name? ")
maths = input("What mathematics would you like to learn, " + name + "? ")
if maths == "Multiplication" or "m" or "x":
multiply(num)
xxxxxxxxxx
def multiply(num):
(num1 * num2)
num1 = random.randint(1,12)
num2 = random.randint(1,12)
if maths == "Multiplication" or "m" or "x":
ans = int(input("What is the answer to " + str(num1) + " x " + str(num2) + " ? "))
if ans == multiply(num1, num2):
print("You are correct! ")
else:
print("Wrong, please try again. ")
return num1 * num2
name = input("What is your name? ")
maths = input("What mathematics would you like to learn, " + name + "? ")
if maths == "Multiplication" or "m" or "x":
multiply(num)