首页 > 编程语言 > 详细

Learn Python 014: Funtions

时间:2017-07-16 23:15:36      阅读:298      评论:0      收藏:0      [点我收藏+]
def weight_converter(gram):
    total_weight = gram / 1000
    return str(total_weight) + ‘KG‘
the_weight = weight_converter(3000)
print(the_weight)

 

Learn Python 014: Funtions

原文:http://www.cnblogs.com/mxyzptlk/p/7192242.html

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