04 2018 档案

摘要:myNum=5 print('猜数字游戏/n') while True: guess=int(input('请猜一个数:')) if guess> myNum: print('猜大了') elif guess< myNum: print('猜小了') else: print('恭喜你,猜对了!') 阅读全文
posted @ 2018-04-28 16:57 poipoipoi 阅读(100) 评论(0) 推荐(0)
摘要:while True: a = input('1:摄氏转华氏\n2:华氏转摄氏\n3:退出\n') if a =='1': celsius = float(input('输入摄氏温度: ')) fahrenheit = (celsius * 9/5) + 32 print('{:.2f}摄氏温度转为华氏温度为{:.2f}\n... 阅读全文
posted @ 2018-04-28 16:11 poipoipoi 阅读(69) 评论(0) 推荐(0)
摘要:while True: a = input('1:摄氏转华氏\n2:华氏转摄氏\n3:退出\n') if a =='1': celsius = float(input('输入摄氏温度: ')) fahrenheit = (celsius * 9/5) + 32 print('{:.2f}摄氏温度转为华氏温度为{:.2f}... 阅读全文
posted @ 2018-04-28 15:15 poipoipoi 阅读(127) 评论(0) 推荐(0)
摘要:name1=input('请输入一个名字:') name2=input('请输入一个名字:') vehicle=input('请输入一种食物:') print('没有吃饭的{}看到了正在吃饭的{},拿起了他的{}吃掉了'.format(name1,name2,vehicle)) 阅读全文
posted @ 2018-04-16 17:00 poipoipoi 阅读(80) 评论(0) 推荐(0)