摘要:
f=open('son.txt',mode='r',encoding='utf-8') fText = f.read()print(fText)replaceList = ['?',',','.',';']for c in replaceList: fText = fText.replace(c,' 阅读全文
摘要:
f=open('son.txt',mode='r',encoding='utf-8')fText = f.read()print(fText)replaceList = ['?',',','.',';']for c in replaceList: bigText = bigText.replace( 阅读全文
摘要:
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 阅读全文
摘要:
fr=open('letter.txt',mode='r',encoding='utf-8')plaincode = fr.read()print('明文:'+plaincode)print('密文:',end='')open('letter.txt',mode='r',encoding='utf-8')for c in plaincode: print(chr (ord(c)+3),e... 阅读全文
摘要:
for i in range(12): print(9800+i,chr(9800+i)) id= '445221199803106993'area = id[0:6]birthday = id[3:10]sex = id[-1]print(area,birthday,sex)if (int(sex) % 2 == 0): print('girl')else: print('b... 阅读全文
摘要:
stuNum='201709080063'print('年级是:'+stuNum[0:4])print('专业编号是;+stuNum[4:9]')print('序号是;'+stuNum[-3:])IDNo= '445221199803106993'print('省市是:'+IDNo[0:2])pri 阅读全文
摘要:
import turtle turtle.setup(600,400,0,0) turtle.bgcolor('red') turtle.color('yellow') turtle.fillcolor('yellow') def mygoto(x,y): turtle.penup() turtle 阅读全文
摘要:
import turtle # 设置初始位置 turtle.penup()turtle.left(90)turtle.fd(200)turtle.pendown()turtle.right(90) # 花蕊 turtle.fillcolor("red")turtle.begin_fill()turt 阅读全文
摘要:
import turtle# 设置初始位置 turtle.penup()turtle.forward(100)turtle.right(144)turtle.forward(100)turtle.right(144)turtle.forward(100)turtle.right(144)turtle 阅读全文