I'm trying to set up a situation in which the user inputs a number and an operator and the output is the (user number) (user operator) on a list of 1 through 10.
This is hard to explain, but here's the code:
num = int(input("Enter a number greater than 1: "))
oper = input("Choose a math operation (+, -, *): ")
for i in range(1, 11):
print(num)
And I get lost there. I want to get something that looks like
num oper 1 = (whatever num and the operator and 1 equal)
num oper 2 = (whatever num and the operator and 2 equal)
And so on.
So my question is: How do you assign a user-inputted operator to a variable?