# Project: Weight Converter Problem

**URL:** <https://forum.codewithmosh.com/t/project-weight-converter-problem/14043>\
**Category:** Python\
**Created:** [July 31, 2022, 1:33pm UTC](https://forum.codewithmosh.com/t/project-weight-converter-problem/14043 "2022-07-31T13:33:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hecker](https://avatars.discourse-cdn.com/v4/letter/h/13edae/32.png) [@Hecker](https://forum.codewithmosh.com/u/Hecker)\
**Post date:** [July 31, 2022, 1:33pm UTC](https://forum.codewithmosh.com/t/project-weight-converter-problem/14043/1 "2022-07-31T13:33:50Z")

</div>

Why does this code not work? When i type K or k it converts it to Kilograms instead of pounds

weight = input("Weight: “)  
unit = input(”(L)bs or (K)g: ")

if unit == “L” or “l”:  
print(f"You are {int(weight) \* 0.45} Kilograms")  
elif unit == “K” or “k”:  
print(f"You are {int(weight) \* 2.205} Pounds")

 ![image](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/7/77aeb8131ea433e7a3dba3e1ffd1e1070724522b.png)

---

<div class="post-metadata">

**Author:** ![jmrunkle](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/jmrunkle/32/3765_2.png) [@jmrunkle](https://forum.codewithmosh.com/u/jmrunkle)\
**Post date:** [July 31, 2022, 2:33pm UTC](https://forum.codewithmosh.com/t/project-weight-converter-problem/14043/2 "2022-07-31T14:33:29Z")

</div>

The problem is the conditionals need to have an expression on both sides of the `or` otherwise it is treating the literal string as a boolean (which means it gets treated as true unless it is the empty string).

So you want to use:

```python
if unit == 'L' or unit == 'l':
  ...

```

Similar for the other condition. Otherwise you can convert to upper or lowercase and only do one comparison.
