摘要: a=int(input ('摄氏度转换为华氏度请按 1\n华氏度转换为摄氏度请按 2\n')) if a==1: c = float(input('请输入摄氏温度:')) f = c*9/5+32 print('{:.2f}°C转换成华氏温度为{:.2f}°F'.format(c,f)) else: 阅读全文
posted @ 2018-04-25 21:03 刘海茵 阅读(365) 评论(0) 推荐(0) 编辑
摘要: >>> a=input('请输入一个数') 请输入一个数5 >>> print(a) 5 >>> a=input('请输入一个数;') 请输入一个数;5 >>> print(a) 5 >>> type(a) >>> a=input('请输入一个摄氏温度;') >>> sum2=int(a)*9/5+32 >>> print('转换的华氏温度是;[]'.format(sum2)) ... 阅读全文
posted @ 2018-04-25 20:39 刘海茵 阅读(113) 评论(0) 推荐(0) 编辑