Hi guys,
I am quite new to Python and I was doing an exercise. The task is to create a convertor that converts your weight from Kg to Lbs or the other way around. The input from the user should not be case sensitive.
My solution is quite similar to what the guy wrote but for some reason the “or” operator doesn’t seem to work. Can someone explain why?
Here is my code:
Weight = float(input('Weight: '))
choice = input('(L)bs or (K)g: ')
KG = (Weight * 0.453592)
Lbs = (Weight * 2.20462)
if choice == 'L' or 'l':
print(f"You are {KG} kilos")
else:
print(f"You are {Lbs} pounds")