首页 > 编程语言 > 详细

python练习-地毯价格

时间:2017-01-08 08:21:08      阅读:253      评论:0      收藏:0      [点我收藏+]
#交互式输入房间的长和宽(平方米),并输入地毯单价平方尺(1平方米=9平方尺),算出最终的地毯价格
wide=raw_input("enter the wide of the house")
long=raw_input("enter the long of the house")
footprice=raw_input("pls enter the price of square foot")
area=int(wide)*int(long)
meterprice=int(footprice)*9
totalprice=meterprice*area
print "your house area have",  area , "square meter"
print "you buy the carpet ,the Carpet price is ", totalprice
#print meterprice

python练习-地毯价格

原文:http://huzhongliang.blog.51cto.com/1817180/1890117

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!