Jun-03-2018, 08:52 PM
(This post was last modified: Jun-03-2018, 08:53 PM by sergeyovic.)
hello there ,
first of all i'm all new to this language , and all my knowledge this far in computing comes from C .
my issues are with this code lines :
----------------------------------------------------
the problem is , by getting from the users "Y" or "y" the condition that happens is the first one , which should happen by getting "N" or "n" .more then that, by getting some other char that is not N,n,Y,y the result is again the first messege .
putting Parenthesis: answer == ("N" or "n") doesnt completly solve the problem .
what's wrong with those lines ? is it a syntax problem ?
how do i solve it ?
first of all i'm all new to this language , and all my knowledge this far in computing comes from C .
my issues are with this code lines :
----------------------------------------------------
answer=input("would you like to proceed Y/N ? ") if answer == "N" or "n" : print("too bad ,thank you {} see you again ".format(users_name)) elif answer == "Y" or "y": print("great !")----------------------------------------------------
the problem is , by getting from the users "Y" or "y" the condition that happens is the first one , which should happen by getting "N" or "n" .more then that, by getting some other char that is not N,n,Y,y the result is again the first messege .
putting Parenthesis: answer == ("N" or "n") doesnt completly solve the problem .
what's wrong with those lines ? is it a syntax problem ?
how do i solve it ?
