weight=input("Weight: ") iweight=float(weight) kg_lb=input("(L)bs or (K)g: ") if kg_lb=='L' or 'l': iweight=0.4535*iweight print(f"You are {iweight} kilos") elif kg_lb=='K' or 'k': iweight=2.2046 * iweight print(f"You are {iweight} pounds")I am new to Python. This is a weight converter program. But the or statement is not working. Can someone please mention the problem with this code.?
buran write Nov-14-2020, 04:42 PM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.