I'm having trouble with a program I'm writing and any help would be greatly appreciated. I'm supposed to use an if statement to return an error message if the values entered aren't either the strings 'on' or 'off'. Right now I have
if (b1 and b2 and b3 and b4 != str('on') or b1 and b2 and b3 and b4 !=str('off')):
print'You must enter either on or off for the button states.'
The problem is the program prints out the statement even if all the values entered are either the strings 'on' or 'off'. The program prints out the error statement whether theres an error or not. Im not sure what I am doing wrong and would really appreciate any help since I have to turn in this program tonight!
Thanks