Jan-10-2019, 03:11 AM
I am trying to code a variable with a range from 4-10. The user inputs a number that will be determined if it's one of the numbers in the variable (4 to 10).
I tried using the following:
What command(s) do I need to use to create a variable range? Thanks.
I tried using the following:
variable = range(4, 10) #Then the user input: number = input('Enter a number:') if number == variable: print(variable 'selected.')This isn't working for me. It seems to just ignore these commands.
What command(s) do I need to use to create a variable range? Thanks.