with the code I'm trying to accomplish is that I'm asking the user to for a number between 1 and 12 and then display the times table for that number. The while loop checks if it's not a number or if its less than 1 or more than 12 then it will loop until it input is correct. However I get the error (written on the title) Any ideas how to fix this?
user_input = print('Input number between 1-12: ')
#While loop to keep checking the following conditions
while (not user_input.isdigit()) or (int(user_input < 1) or int(user_input > 12)):
print("Please input a number between 1-12")
user_input = print("Input selection >> ")
#Now convert user_input into an int
user_input = int(user_input)
print('------------------------------------------')
print()
print(f'This is the {user_input} times table')
print()
for i in range(1,13):
print(f'{i} x {user_input} = {i*user_input}')