Re: [Tutor] if syntax expression help

2010-11-25 Thread Alan Gauld
"Rance Hall" wrote My current if statement looks like this: if ((userentry.lower != "c" or userentry.lower != "i") and mode == "add"): Peter has poinrted out one roblem but there is another. The or expression will always be true, consider: 1) The first term wi

Re: [Tutor] if syntax expression help

2010-11-25 Thread Peter Otten
Rance Hall wrote: > I have a user entered variable that I need to check to see if they > entered one of the two legal values. > > But I only need to check this if one other fact is true. > > > we have a variable called "mode" whose value is either "add" or > "edit" based on how we where called

[Tutor] if syntax expression help

2010-11-25 Thread Rance Hall
I have a user entered variable that I need to check to see if they entered one of the two legal values. But I only need to check this if one other fact is true. we have a variable called "mode" whose value is either "add" or "edit" based on how we where called. we have a userentry variable tie