0

Trying to create a simple conversion tool from lbs > kg, or kg > lbs in Python.

Here is code:

weight = int(input("Enter your weight: "))
measure = input("Is this K(g) or L(b):"  )

if measure == "K" or "k":
  converted = weight / 0.45
  print("Your weight in lbs is: " + str(converted))
else:
  converted_1 = weight * 0.45
  print("Your weight in kg is: " + str(converted_1))

If input is K it should return a result in lbs, otherwise should return a result converted to KG.

No matter input, can only get first response to print

H0RCRUX
  • 1
  • 1

0 Answers0