在输入数据时: 输入数字,对公式进行计算。
而普通的输入数据:
xxx=input("please enter the data xxx: ")
报错TypeError: must be real number, not str
更改: xxx = float(input("please enter the data xxx: "))
在输入数据时: 输入数字,对公式进行计算。
而普通的输入数据:
xxx=input("please enter the data xxx: ")
报错TypeError: must be real number, not str
更改: xxx = float(input("please enter the data xxx: "))