五星红旗

摘要: import turtle turtle.bgcolor("red") turtle.fillcolor("yellow") turtle.color('yellow') turtle.speed(10) turtle.begin_fill() turtle.up() turtle.goto(-600,220) turtle.down() for i in range (5): ... 阅读全文
posted @ 2018-05-16 20:06 李剑豪 阅读(123) 评论(0) 推荐(0) 编辑

程序执行流程/布尔类型与布尔:运算猜数字游戏;库的使用:turtle

摘要: myNumber = 45\ while True: guess = int(input('请输入一个数字:')) if guess > myNumber: print('有点大!') elif guess < myNumber: print('有点小!') else: print('恭喜你猜中了') ... 阅读全文
posted @ 2018-05-02 21:03 李剑豪 阅读(122) 评论(0) 推荐(0) 编辑

第三次作业

摘要: while True: a = int(input('摄氏温度转换为华氏温度请按 1\n华氏温度转化为摄氏温度请按 2\n退出请按 3\n')) if a==1: c = float(input('请输入摄氏温度:')) f = (c)*9/5+32 print('摄氏{:.2f}温度转为华氏温度是{:.2f}'.format(c,... 阅读全文
posted @ 2018-04-25 21:24 李剑豪 阅读(108) 评论(0) 推荐(0) 编辑

第二次作业

摘要: 摄氏温度转华氏温度 a=input('请输入摄氏温度') sum2=int(a)*5/9+32print('转换的华氏温度是;{}'.format(sum2)) 华氏温度转摄氏温度 a=input('请输入华氏温度') sum2=int(a)*5/9-32print('转换的摄氏温度是;{}'.fo 阅读全文
posted @ 2018-04-25 20:55 李剑豪 阅读(73) 评论(0) 推荐(0) 编辑