摘要: #1 gFile = open('g.txt',mode='r',encoding='utf-8') gText = gFile.read() gFile.close() print(gText) #2 replaceList = [',','.',"'",'\n'] for c in replaceList: gText=gText.replace(c,' ') gText = gT... 阅读全文
posted @ 2018-06-20 21:44 张可201709080002 阅读(97) 评论(0) 推荐(0) 编辑
摘要: import turtle colors=['yellow','red','black','blue','purple','orange'] turtle.speed(10) for i in range(100): turtle.pencolor(colors[i%6]) turtle.forwa 阅读全文
posted @ 2018-05-30 21:36 张可201709080002 阅读(87) 评论(0) 推荐(0) 编辑
摘要: fr = open('zk.txt',mode='r',encoding='utf-8') plaincode = fr.read() print('明文:' + plaincode) print('密文:',end='') for c in plaincode: print(chr(ord(c)+ 阅读全文
posted @ 2018-05-30 21:19 张可201709080002 阅读(85) 评论(0) 推荐(0) 编辑
摘要: s=input('明文:') for c in s: print(chr(ord(c)+3),end='') 阅读全文
posted @ 2018-05-23 21:41 张可201709080002 阅读(89) 评论(0) 推荐(0) 编辑
摘要: print(ord('+')) print(chr(9800)) print(chr(9801)) for i in range(12): print(9800+i,chr(9800+i)) 阅读全文
posted @ 2018-05-23 20:58 张可201709080002 阅读(75) 评论(0) 推荐(0) 编辑
摘要: import turtle turtle.setup(600,400,0,0) turtle.bgcolor('red') turtle.color('yellow') turtle.fillcolor('yellow') def mygoto(x,y): turtle.penup() turtle 阅读全文
posted @ 2018-05-16 21:39 张可201709080002 阅读(122) 评论(0) 推荐(0) 编辑
摘要: import turtle turtle.setup(600,400,0,0) turtle.bgcolor('red') turtle.color('yellow') turtle.fillcolor('yellow') def mygoto(x,y): turtle.penup() turtle 阅读全文
posted @ 2018-05-16 20:43 张可201709080002 阅读(86) 评论(0) 推荐(0) 编辑
摘要: import turtle turtle.bgcolor('red') turtle.color('yellow') turtle.fillcolor('yellow') turtle.begin_fill() for i in range(5): turtle.forward(100) turtle.right(144) turtle.end_fill() turtle.do... 阅读全文
posted @ 2018-05-09 20:59 张可201709080002 阅读(78) 评论(0) 推荐(0) 编辑
摘要: import turtle >>> turtle.forward(100) >>> turtle.forward(100) >>> turtle.clear() >>> turtle.forward(100) >>> ard(100) Traceback (most recent call last 阅读全文
posted @ 2018-05-02 21:44 张可201709080002 阅读(143) 评论(0) 推荐(0) 编辑
摘要: while True: guess=int(input('猜一个数字')) if guess>myNumber: print('大了一点') elif guess <myNumber: print('小了一点') else: print('猜对了') break 阅读全文
posted @ 2018-05-02 20:38 张可201709080002 阅读(78) 评论(0) 推荐(0) 编辑