num = str(input("Enter a number greater than 1: "))
oper = str(input("Choose a math operation (+, -, *, /, %, //): "))
if oper in ["+", "-", "*", "/", "%", "//"]:
for i in range(1, 11):
operation = num + oper + str(i) #Combine the string that is the operation
print("{} {} {} = {}".format(num,oper,str(i),eval(operation)))
else: #if it is not in our approved items
print("Operation not supported.")
def operation(number1, number2, operator):
if operator == '+':
return number1 + number2
elif operator == '-':
return number1 - number2
num = int(input("Enter a number greater than 1: "))
oper = raw_input("Choose a math operation (+, -, *): ")
for i in range(1, 11):
if oper == '+':
print(num, oper, i, '=', num + i)
elif oper == '-':
print(num, oper, i, '=', num - i)
elif oper == '*':
print(num, oper, i, '=', num * i)
else:
print('operator is not supported')