摘要: import turtle turtle.speed(10) colors = ['pink','blue','red','green','purple','orange'] for i in range(250): turtle.pencolor(colors[i%6]) turtle.forward(i) turtle.left(59) turtle.done()... 阅读全文
posted @ 2018-06-04 15:41 youuoy 阅读(126) 评论(0) 推荐(0) 编辑
摘要: fr = open('huang.txt',mode='r',encoding='utf-8') huang = fr.read() print(huang) print('密文:',end='') for c in huang: print(chr(ord(c)+3),end='') 明天早上坐火车去长沙,我们可以在那边玩三天三夜,吃辣的东西,吃冰的东西。 密文:"昑夬旬不... 阅读全文
posted @ 2018-05-28 16:48 youuoy 阅读(123) 评论(0) 推荐(0) 编辑
摘要: stuNum = '43048219981027508X' print('所在省市:'+stuNum[0:2]) print('所在地区:'+stuNum[2:4]) print('所在县区:'+stuNum[4:6]) print('出生日期年:'+stuNum[6:10]) print('出生日期月:'+stuNum[10:12]) print('出生日期日:'+stuNum[12:14]... 阅读全文
posted @ 2018-05-21 16:04 youuoy 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-05-14 16:05 youuoy 阅读(77) 评论(0) 推荐(0) 编辑
摘要: >>> import turtle >>> turtle.setup(600,400,0,0) >>> turtle.bgcolor("red") >>> turtle.color("yellow") >>> turtle.fillcolor("yellow") >>> turtle.begin_fill() >>> for i in range(5): turtle.forward(200)... 阅读全文
posted @ 2018-05-07 16:58 youuoy 阅读(128) 评论(0) 推荐(0) 编辑
摘要: while True: a = int(input('请猜一个100以内的数:')) if a>43: print('你猜的太大了') elif a>> import turtle >>> turtle.circle(50) >>> turtle.circle(100) >>> turtle.done() >>> import turtle >... 阅读全文
posted @ 2018-05-07 16:19 youuoy 阅读(113) 评论(0) 推荐(0) 编辑
摘要: while True: a = input('1:摄氏转华氏\n2:华氏转摄氏\n3:退出\n') if a=='1': c = float(input('输入一个摄氏温度:')) f = (c*9/5)+32 print('{:.2f}摄氏温度转为华氏温度为:{:.2f}'.format(c,f)) elif a=='2': f = float(in... 阅读全文
posted @ 2018-04-23 16:53 youuoy 阅读(104) 评论(0) 推荐(0) 编辑
摘要: n1 = input('请输入第一个数:') n2 = input('请输入第二个数:') sum2 = int(n1)+int(n2) print('两个数的和是:{}'.format(sum2)) 请输入第一个数:8 请输入第二个数:7 两个数的和是:15 a = input('请输入一个华氏温度:') sum2 = 5/9*(int(a)-32) print('... 阅读全文
posted @ 2018-04-20 21:08 youuoy 阅读(119) 评论(0) 推荐(0) 编辑
摘要: name1 = input('请输入一个名字:') name2 = input('请再输入一个名字:') vehicle = input('请输入一个地方:') print('{}和{}手牵手,奔跑在浪漫的{}'.format(name1,name2,vehicle)) input('press any key') 阅读全文
posted @ 2018-04-16 16:23 youuoy 阅读(112) 评论(0) 推荐(0) 编辑