I cant cut down the number of digits to a max of two after decimal in my solution of converting weight from kg to lbs and vice versa. Here is the code
weight = float(input("Enter Weight: "))
tyype = input("(K)Kg or (L)Lbs: ")
if tyype == 'l' or tyype == 'L':
KK = weight * 0.45
print("Your weight is ", end="")
print("{0:.3f}".format(KK))
elif tyype == 'k' or tyype == 'K':
print(f"Your weight is {weight*2.22} Lbs")
else:
print("Unrecognised type")
I tried formatting and rounding but it isnt working... Please help me