Heqy  

2018年6月11日

摘要: #1. wakeFile = open('wake.txt',mode='r',encoding='utf-8') wakeText = wakeFile.read() wakeFile.close() print(wakeText) #2. replaceList = ["'",'\n'] for c in replaceList: wakeText = wakeText.repla... 阅读全文
posted @ 2018-06-11 17:01 Heqy 阅读(92) 评论(0) 推荐(0) 编辑

2018年6月4日

摘要: import turtle turtle.speed(10) colors = ['#EEEE00','#FF82AB','#98FB98','#54FF9F','#8470FF','#CAFF70','#00FFFF','#8A2BE2','#00868B','#CDCD00','#CD5555','#AEEEEE'] for i in range(200): turtle.penc... 阅读全文
posted @ 2018-06-04 16:57 Heqy 阅读(173) 评论(1) 推荐(0) 编辑

2018年5月28日

摘要: 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='') fw = open('cipherText.txt',mode='a... 阅读全文
posted @ 2018-05-28 17:02 Heqy 阅读(171) 评论(0) 推荐(0) 编辑

2018年5月21日

摘要: print(1+2+3) stuNum='201709080012' print('年级是:'+stuNum[0:4]) print('专业编号是:'+stuNum[4:9]) print('序号是:'+stuNum[-3:]) stuNum='440302199901032626' print('市区编号:'+stuNum[0:6]) print('生日:'+stuNum[6:14]... 阅读全文
posted @ 2018-05-21 16:10 Heqy 阅读(128) 评论(0) 推荐(0) 编辑

2018年5月14日

摘要: import turtle while True: turtle.forward(150) turtle.right(220) if abs(turtle.pos())<1: break turtle.end_fill() turtle.done() import turtle turtle.setup(600,400,0,0) turtle.bg... 阅读全文
posted @ 2018-05-14 16:43 Heqy 阅读(1006) 评论(0) 推荐(0) 编辑

2018年5月7日

摘要: 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)... 阅读全文
posted @ 2018-05-07 16:35 Heqy 阅读(354) 评论(1) 推荐(0) 编辑

2018年4月28日

摘要: myNum = 6 print('猜字游戏\n') while True: guess = int(input('请输入一个数:')) if guess > myNum: print('不对哦猜大了') elif guess >> import turtle >>> turtle.circle(100) >>> turtle.circle(150) ... 阅读全文
posted @ 2018-04-28 17:00 Heqy 阅读(231) 评论(0) 推荐(0) 编辑

2018年4月23日

摘要: while True: a = input('1:摄氏度转华氏\n2 :华氏转摄氏\n3 :退出\n') if a =='1': f = input('请输入华氏温度:') c = 5/9*(float(f)-32) print('{}华氏温度转为摄氏温度为:{:.2f}'.format(f,c)) 阅读全文
posted @ 2018-04-23 16:49 Heqy 阅读(268) 评论(0) 推荐(0) 编辑

2018年4月16日

摘要: n1 = input('请输入第一个数') n2 = input('请输入第二个数') n3 = input('请输入第三个数') n4 = input('请输入第四个数') sum2 = int(n1)+int(n2)+int(n3)+int(n4) print('四个数的总和是:{}'.format(sum2)) a = input('请输入一个摄氏温度:') sum2=int(... 阅读全文
posted @ 2018-04-16 17:09 Heqy 阅读(142) 评论(0) 推荐(0) 编辑
 
摘要: name1 = input('请输入一个名字:') name2 = input('再输入一个名字:') animal = input('请输入一种动物:') print('一二三四五{}上山打{}不在家打到{}'.format(name1,name2,animal)) input('press an 阅读全文
posted @ 2018-04-16 15:51 Heqy 阅读(130) 评论(0) 推荐(0) 编辑