首页 > 其他 > 详细

2.1摄氏温度转为华氏温度.py

时间:2018-04-22 17:54:14      阅读:179      评论:0      收藏:0      [点我收藏+]
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 22 14:57:48 2018

@author: MyPC
"""
def main():
    ‘‘‘
    摄氏温度转为华氏温度.
    
    公式:fathrenheiit=(9 / 5) * celsius + 32
    input:celsius
    output:fathrenheiit
    ‘‘‘
    
    celsius = eval(input("input Celsius:"))
    fahrenheit=(9 / 5) * celsius + 32
    print("%4.2f Celsius is %5.2f fahrenheit"%(celsius,fahrenheit))
    
    
if __name__ == "__main__":
    main()
    
    

    

 

2.1摄氏温度转为华氏温度.py

原文:https://www.cnblogs.com/Wang-Y/p/8908292.html

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