代码:
weight = input("请输入您的体重:")
print(12.1*weight)
input输入的是字符串,不能用字符串乘以浮点数,改为:
weight = eval(input("请输入您的体重:"))
print(12.1*weight)
代码:
weight = input("请输入您的体重:")
print(12.1*weight)
input输入的是字符串,不能用字符串乘以浮点数,改为:
weight = eval(input("请输入您的体重:"))
print(12.1*weight)