📅  最后修改于: 2022-03-11 14:46:07.283000             🧑  作者: Mango
#another way is to check if the entered number isdigit()
#that way you will ensure unhandled exception incase of erroneus data
number= input("What is your weight:")
if number.isdigit():
kilos=int(float(number))
print ("The weight of the person is:" + str(kilos))
else:
print("Error - Please enter a proper weight")