摘要: JinFile = open('jin.txt','r',encoding='utf-8') JinText = JinFile.read() JinFile.close() print(JinText) replacelist = ["'",'\n' ... 阅读全文
posted @ 2018-06-11 16:54 金丽娜 阅读(128) 评论(0) 推荐(0) 编辑
摘要: import turtle turtle.speed(10) colors =['#00FFFF','#00F5FF','#00E5EE','#00EEEE','#00CED1'] for i in range(200): turtle.pencolor(colors[i%5]) turtle.fo 阅读全文
posted @ 2018-06-04 15:47 金丽娜 阅读(106) 评论(0) 推荐(0) 编辑
摘要: fr = open('plainText.txt',mode='r',encoding='utf-8') plainText = fr.read() print(plainText) print('密文',end='') for c in plainText: print(chr(ord(c)+3),end='')fr = open('plainText.txt',mode='r',en... 阅读全文
posted @ 2018-05-28 16:04 金丽娜 阅读(100) 评论(0) 推荐(0) 编辑
摘要: for i in range(12): print(chr(9800+i)) stuNum = '201709090015' print('年级是:'+stuNum[0:4]) print('专业编号是:'+stuNum[4:9]) print('序号是:'+stuNum[-3:]) stuNum ='421302199905298163' print('所在省市:... 阅读全文
posted @ 2018-05-21 15:24 金丽娜 阅读(84) 评论(0) 推荐(0) 编辑
摘要: import turtle turtle.setup(600,400,0,0) turtle.bgcolor('black') turtle.color('white') turtle.fillcolor('white') def mygoto(x,y): turtle.penup() turtle.goto(x,y) turtle.pendown() def dra... 阅读全文
posted @ 2018-05-14 15:18 金丽娜 阅读(147) 评论(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): 阅读全文
posted @ 2018-05-07 16:41 金丽娜 阅读(121) 评论(0) 推荐(0) 编辑
摘要: myNum=10 print('猜我多少岁\n') while True: guess = int(input('请输入一个数字:')) if guess > myNum: print('猜大了') elif guess < myNum: print('猜小了') else: print('恭喜你,猜对了!请到讲台... 阅读全文
posted @ 2018-05-07 15:54 金丽娜 阅读(573) 评论(0) 推荐(0) 编辑
摘要: f = float(input('请输入摄氏温度:')) c =5/9*(f-32) print('{:.2f}华氏温度转为摄氏温度为:{:.2f}'.format(f,c)) c = float(input('请输入华氏温度:')) f = c*9/5+32 print('{:.2f}摄氏温度转为华氏温度:{:.2f}'.format(c,f)) 阅读全文
posted @ 2018-04-23 16:52 金丽娜 阅读(106) 评论(0) 推荐(0) 编辑
摘要: name1 = input('请输入一个名字:') name2 = input('请输入一个名字:') vehicle = input('请输入一种车子:') print('上完课的{}开着{}回到宿舍,遇到{},并say了个hi'.format(name1,vehicle,name2)) inpu 阅读全文
posted @ 2018-04-16 16:36 金丽娜 阅读(143) 评论(0) 推荐(0) 编辑