摘要: while True: a = input('1:摄氏温度转为华氏温度请按\n2:华氏温度转为摄氏温度请按\n3:退出\n') if a =='1': c = float(input('请输入华氏温度:')) f = c*9/5+32 print('{:.2f}摄氏温度转为华氏温度为:{:.2f}\n'.format(c,f))... 阅读全文
posted @ 2018-04-28 16:40 12z 阅读(119) 评论(0) 推荐(0) 编辑
摘要: myNum=8 print('猜数字游戏/n') while True: guess=int(input('请猜一个数:')) if guess> myNum: print('猜大了') elif guess< myNum: print('猜小了') else: print('恭喜你,猜对了!') 阅读全文
posted @ 2018-04-28 16:20 12z 阅读(120) 评论(0) 推荐(0) 编辑