-1
weight = input("Weight: ")
unit = input("(K)g sau (L)bs: ")

if str(unit) == "l" or "L":
    print(weight * 3)
else str(starea) == "k" or "K":
    print(weight * 0.45)
deceze
  • 510,633
  • 85
  • 743
  • 889
  • See [this](https://stackoverflow.com/a/20002504/476). Also, `str(unit)` is pretty superfluous, since `unit` is by definition a string already. On the contrary, you need to do `int(weight)` if you want to treat it as a number. – deceze Dec 15 '20 at 07:30

1 Answers1

0

You aren't typecasting the input with int() in this scenario

This is why python thinks that your input is '36' instead of 36

When you do '36'*3 what actually happens is that '36' gets repeated 3 times so the output would be '363636'