|
|
|
|
|
摘要:
wwwFile = open('www.txt',mode='r',encoding='utf-8') wwwTe replaceList=[',','.',"'",'\n'] for c in replaceList: wwwText = wwwText.replace(c,'') print(w 阅读全文
posted @ 2018-06-20 21:31
zhhhhmmmff
阅读(120)
推荐(0)
编辑
摘要:
def hanoi(n,a,b,c): if n==1: print(n,a+'->'+c) else: hanoi(n-1,a,c,b) print(n,a+'->'+c) hanoi(n-1,b,a,c) hanoi(5,'A','B','C') 阅读全文
posted @ 2018-06-13 20:35
zhhhhmmmff
阅读(85)
推荐(0)
编辑
摘要:
l = ['Michael','Bob','Tracy'] l.append('Bob') l.pop() print(1) t = ('Michael','Bob','Tracy') scores = [85,65,55] d = {'Michael':85,'Bob':65,'Tracy':55} d['Bob'] = 82 d['Rose'] = 88 d.pop('Bob') .. 阅读全文
posted @ 2018-06-06 21:36
zhhhhmmmff
阅读(178)
推荐(0)
编辑
摘要:
import turtle turtle.speed(10) colors = ['red', 'purple', 'blue', 'green' , 'yellow', 'orange'] for i in range(200): turtle.pencolor(colors[i% 6]) tur 阅读全文
posted @ 2018-05-30 21:35
zhhhhmmmff
阅读(96)
推荐(0)
编辑
摘要:
fr = open('zhhh.txt',mode='r',encoding='utf-8') plaincode = fr.read() print('miwen:' + plaincode) print('mingwen:',end='') for c in plaincode: print(c 阅读全文
posted @ 2018-05-30 21:20
zhhhhmmmff
阅读(77)
推荐(0)
编辑
摘要:
fr = open('letter222.txt',mode='r',encoding='utf-8') plaincode = fr.read() print('明文:' + plaincode) print('密文:',end='') for c in plaincode: print (chr 阅读全文
posted @ 2018-05-30 21:10
zhhhhmmmff
阅读(55)
推荐(0)
编辑
摘要:
s = input('明文:') for c in s: print(chr(ord(c)+3),end='') 阅读全文
posted @ 2018-05-23 21:17
zhhhhmmmff
阅读(81)
推荐(0)
编辑
摘要:
for i in range(12): print(i,chr(9800+i)) 阅读全文
posted @ 2018-05-23 20:48
zhhhhmmmff
阅读(69)
推荐(0)
编辑
摘要:
stuNum = '201709080013' print('年级是:'+stuNum[0:4]) print('专业编号是:'+stuNum[4:9]) print('序号是:'+stuNum[-3:]) IDNo= '441823200001212716' print('省市是:'+IDNo[0 阅读全文
posted @ 2018-05-23 19:59
zhhhhmmmff
阅读(69)
推荐(0)
编辑
摘要:
port turtle #画一个五角星 turtle.setup(600,400,0,0) turtle.bgcolor('red') turtle.pencolor('yellow') turtle.fillcolor('yellow') def mygoto(x,y): turtle.penup() turtle.goto(x,y) turtle.pend... 阅读全文
posted @ 2018-05-16 20:53
zhhhhmmmff
阅读(144)
推荐(0)
编辑
|
|