Re: [Tutor] Finding if a passed variable is within to set parameters

2011-10-10 Thread Alan Gauld
On 10/10/11 23:13, Mike Nickey wrote: What I want is to have the user be able to enter 1 through 8 and have the information pass fine but anything else would cause the user to repeat the process. if not (1 <= value <= 8): # handle error else: # carry on as planned I'm using a while loop

Re: [Tutor] Finding if a passed variable is within to set parameters

2011-10-10 Thread Steven D'Aprano
Mike Nickey wrote: Hey all, I'm trying to write a def that has a check to see if the entered information is within a pre-determined valid set. Below is what I have so far but it doesn't seem to be working properly. What I want is to have the user be able to enter 1 through 8 and have the inform

Re: [Tutor] Finding if a passed variable is within to set parameters

2011-10-10 Thread Marc Tompkins
On Mon, Oct 10, 2011 at 3:13 PM, Mike Nickey wrote: > Hey all, > > I'm trying to write a def that has a check to see if the entered > information is within a pre-determined valid set. > Below is what I have so far but it doesn't seem to be working properly. > What I want is to have the user be ab

[Tutor] Finding if a passed variable is within to set parameters

2011-10-10 Thread Mike Nickey
Hey all, I'm trying to write a def that has a check to see if the entered information is within a pre-determined valid set. Below is what I have so far but it doesn't seem to be working properly. What I want is to have the user be able to enter 1 through 8 and have the information pass fine but