new to python and need some help with while loop that causing me some issues. I am creating a simple converter.
def converter():
x = 1
while x == 1:
q_1 = input ('please choose the currency you wish to convert: \
a) US Dollar\
b) Euro\
c) Shekel ')
if q_1.lower() is ('a' or 'b' or 'c'):
x += 1
x = 1
q_2 = False
while q_2 is False:
q_2 = input ('please choose the currency you wish to convert to:\
a) US Dollar\
b) Euro\
c) Shekel ')
if q_2.lower() is not ('a' or 'b' or 'c'):
q_2 = False
print ('end for now')
For some reason the first loop is not working. Whatever I input, whether its a,b,c lower or upper or a wrong answer (for example: d,e,f...) it returns the same q_1, Its not moving on to the next block of code even if the input is correct (=a,b,c). Thanks