# -*- 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()
原文地址:https://www.cnblogs.com/Wang-Y/p/8908292.html
时间: 2024-11-08 03:02:40