且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法将数字转换为浮点数

更新时间:2023-02-21 17:02:22

`mpg = float(input('Enter miles per gallon:'))
 gp = float(input('Enter the gas price:'))
 price = (10*1.0/mpg)*gp print(price) 
 price = (50*1.0/mpg)*gp print(price) 
 price = (400*1.0/mpg)*gp print(price)`      

这就是答案,已解决