while True:

num_1 = input("type the first number! ")

types = [“multiply”, “divide”, “add”, “subtract”, “square”]

num_2 = input("type the second number! ")

def multiply_2():

print(num_1 * num_2)

def addition():

print(“the answer is” + num_1 + num_2)

def subtraction():

print(“the answer is” + num_1 - num_2)

def divison():

print(“the answer is” + num_1 / num_2)

def square_2():

print(“the answer is” + num_1 ** num_2)

if num_1.isdigit():

num_1 = int(num_1)

else:

print(“type a number!”)

if num_2.isdigit():

num_2 = int(num_2)

else:

print(“type a number!”)

continue

type_math = input("do you want to divide/add/subtract/multiply/square, the numbers? Type what you want to choose. ").lower()

if type_math not in types:

print(“type a math type!”)

continue

if type_math == “add”:

addition()

elif type_math == “subtract”:

subtraction()

elif type_math == “divide”:

divison()

elif type_math == “multiply”:

multiply_2()

elif type_math == “square”:

square_2()