码迷,mamicode.com
首页 >  
搜索关键字:摄氏度    ( 101个结果
条件语句,while循环语句:完整的温度转换程序
while True: a=input('1.摄氏度2.华氏度') if a =='1': c =input('请输入摄氏度') f =float(c)*9/5+32 print('华氏度为{}'.format(f)) elif a=='2': f = float(input('请输入华氏度')) ... ...
分类:其他好文   时间:2018-04-26 00:55:04    阅读次数:235
温度转换
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: ...
分类:其他好文   时间:2018-04-25 22:15:43    阅读次数:308
理解数据类型与数学运算:求和、温度转换
a=input('请输入第一个数:') b=input('请输入第二个数:') sum2=int(a)+int(b) print('两个数的和是:'.format(sum2)) a=input('请输入一个摄氏度:') sum2=int(a)*9/5+32 print('转换的华氏温度是:{}'.f... ...
分类:其他好文   时间:2018-04-25 22:15:01    阅读次数:333
任人选择的
a = int(input('摄氏度转换为华氏温度请按 1\n华氏温度转化为摄氏度请按 2\n')) if a=='1': c = float(input('请输入摄氏温度: ')) f = c*9/5+32 print('摄氏{:.2f}的华氏为{:.2f}'.format(c,f)) else:... ...
分类:其他好文   时间:2018-04-25 22:14:52    阅读次数:305
用户选择
a=input('1.摄氏转华氏 2.华氏转摄氏') if a =='1': f=float(input('请输入华氏温度')) c=5/9*(f-32) print('{}华氏度转为摄氏度是{}'.format(f,c)) else: c=input('请输入摄氏温度') f=float(c)*9... ...
分类:其他好文   时间:2018-04-25 22:11:39    阅读次数:180
理解数据类型与数学运算:求和、温度转换2
a = int(input('摄氏度转换为华氏温度请按 1\n华氏温度转化为摄氏度请按 2\n')) if a == '1': c = float(input('请输入摄氏温度:')) f = c*9/5+32 print('摄氏{:.2f}的华氏为{:.2f}'.format(c,f)) else ...
分类:其他好文   时间:2018-04-25 22:06:51    阅读次数:163
华氏摄氏同时转换
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: ...
分类:其他好文   时间:2018-04-25 22:06:42    阅读次数:248
温度转换
a=input('摄氏转华氏按1\n 华氏转摄氏按2\n') if a =='1': c = input('请输入摄氏度') f =float(c)*9/5+32 print('{}摄氏温度转化为华氏温度{}'.format(c,f)) else: f=float(input('请输入华氏温度: '... ...
分类:其他好文   时间:2018-04-25 22:02:50    阅读次数:162
摄氏华氏转换
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: ...
分类:其他好文   时间:2018-04-25 22:01:00    阅读次数:145
完整的温度转换程序
a=input('摄氏度转换为华氏温度请按1\n华氏温度转化为摄氏度请按2\n') if a=='1': celsius=float(input('请输入摄氏温度:')) fahrenheit=(celsius*9/5)+32 print('{:2f}摄氏温度转为华氏温度为{:.2f}'.forma ...
分类:其他好文   时间:2018-04-23 18:49:27    阅读次数:141
101条   上一页 1 ... 4 5 6 7 8 ... 11 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!