摘要: l = [['Apple','Google','Microsoft'],\ ['Java','Python','Ruby','PHP'],\ ['Adam','Bart','Lisa']\ ] names= ['Michael','Bob','Tracy'] #list print(names[1] 阅读全文
posted @ 2018-06-04 16:57 粉红猪 阅读(114) 评论(0) 推荐(0) 编辑
摘要: import turtle turtle.speed(15) colors =['red','orange','blue','green','pink','yellow','white','red'] for i in range(250): turtle.pencolor(colors[i%8]) 阅读全文
posted @ 2018-06-04 16:17 粉红猪 阅读(105) 评论(0) 推荐(0) 编辑
摘要: fr = open('fjq.txt',mode='r',encoding='utf-8') fjq = fr.read() print('明文:'+ljy) print('密文:',end='') fw = open('cipherText.txt',mode='a',encoding='utf-8') for c in fjq: print(chr(ord(c)+3),end=''... 阅读全文
posted @ 2018-05-28 17:01 粉红猪 阅读(170) 评论(0) 推荐(0) 编辑
摘要: fr = open('fjq.txt',mode='r',encoding='utf-8') fjq = fr.read() print('明文:'+ljy) print('密文:',end='') fw = open('cipherText.txt',mode='a',encoding='utf- 阅读全文
posted @ 2018-05-28 16:24 粉红猪 阅读(87) 评论(0) 推荐(0) 编辑
摘要: stuNum='201709080035' print('年级是:'+stuNum[0:4]) print('专业编号是:'+stuNum[4:9]) print('序号是:'+stuNum[-3:]) stuNum = '441827199812236025' print('所在省市:'+stuNum[0:2]) print('所在地区:'+stuNum[2:4]) print('所... 阅读全文
posted @ 2018-05-21 16:56 粉红猪 阅读(128) 评论(0) 推荐(0) 编辑
摘要: stuNum='201709080035' print('年级是:'+stuNum[0:4]) print('专业编号是:'+stuNum[4:9]) print('序号是:'+stuNum[-3:]) stuNum = '441827199812236025' print('所在省市:'+stuNum[0:2]) print('所在地区:'+stuNum[2:4]) print('所... 阅读全文
posted @ 2018-05-21 16:10 粉红猪 阅读(125) 评论(0) 推荐(0) 编辑
摘要: import turtle while True: turtle.color("pink") turtle.bgcolor('red') turtle.forward(100) turtle.right(132) if abs(turtle.pos())<1: break turtle.done() import turtle ... 阅读全文
posted @ 2018-05-14 16:47 粉红猪 阅读(68) 评论(0) 推荐(0) 编辑
摘要: import turtle while True: turtle.color("pink") turtle.bgcolor('red') turtle.forward(100) turtle.right(132) if abs(turtle.pos())<1: break turtle.done() 阅读全文
posted @ 2018-05-14 15:46 粉红猪 阅读(79) 评论(0) 推荐(0) 编辑
摘要: import turtle turtle.penup() turtle.left(90) turtle.fd(200) turtle.pendown() turtle.right(90) turtle.fillcolor("red") turtle.begin_fill() turtle.circle(10, 180) turtle.circle(25, 110) turtle.left(... 阅读全文
posted @ 2018-05-11 15:31 粉红猪 阅读(221) 评论(0) 推荐(0) 编辑
摘要: >>> import turtle >>> turtle.circle(10) >>> turtle.circle(20) >>> turtle.circle(30) >>> turtle.circle(40) >>> turtle.circle(50) >>> >>> myNUM = 6 >>> print('猜数字大小游戏/n') 猜数字大小游戏/n >>> while True: ... 阅读全文
posted @ 2018-05-01 02:44 粉红猪 阅读(334) 评论(0) 推荐(0) 编辑