如何用Python使单位米转换为厘米
1、新建一个空白的Python文档。

3、加了STR后,还是错误,因为METRES是数字,数字要和数字相乘。metres = input("Please enter the metres that you want to transfer into centimetres:")print(metres + "m" + "=" + str(metres * 100) + "cm")

5、为了让程序观看方便,定凶及淄靥义变量cm。metres = input("Please enter the metres that you want to transfer into centimetres:")cm = float(metres) * 100print(metres + " m " + " = " + str(cm) + " cm "

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:36
阅读量:85
阅读量:46
阅读量:36
阅读量:31