Aug-28-2021, 03:18 AM
I'm new to Python as a language but not coding as a whole, and I can't figure out why an if statement is running when the conditions aren't met. I'm trying to make a simple conversion tool, but no matter what the user tells it to convert to, the program always converts it to kg. Whenever I type an L to signify it needs to convert to lbs and not kg it still converts to kg. I can't figure out why it only wants to convert to kg even when it doesn't have the right conditions being met
weight = input("Weight: ") convert = input("Convert to (K)g or (L)bs: ") if convert == "K" or "k": print("Rough weight in Kg: " + str(float(weight) // 2.205)) elif convert == "L" or "l": print("Rough weight in Lbs: " + str(float(weight) * 2.205))