摘要: #1, riverFile = open('river.txt','r') riverTest = riverFile.read() riverFile.close() print(riverTest) #2, print(riverTest.replace(',',' ')) print(riverTest.replace("'",' ')) print(riverTest) #3, prin... 阅读全文
posted @ 2018-06-11 17:02 chenguanxun 阅读(103) 评论(0) 推荐(0) 编辑
摘要: import turtle turtle.speed(76) colors = ['red','purple','blue','green','yellow','orange'] for i in range(200): turtle.pencolor(colors[i%6]) turtle.for 阅读全文
posted @ 2018-06-04 15:41 chenguanxun 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-05-28 17:04 chenguanxun 阅读(77) 评论(0) 推荐(0) 编辑
摘要: stuNum = '201709090053' print('年级是:'+stuNum[0:4]) print('专业编号是:'+stuNum[4:9]) print('序号是:'+stuNum[-3:]) stuNum = '440111199810260216' print('所在省市:'+st 阅读全文
posted @ 2018-05-21 16:29 chenguanxun 阅读(126) 评论(0) 推荐(0) 编辑
摘要: print("Hello, world! My name is type your name") import turtle while True: turtle.forward(140) turtle.right(170) if abs(turtle.pos())<1: break turtle.done() 阅读全文
posted @ 2018-05-14 15:19 chenguanxun 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 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, ... 阅读全文
posted @ 2018-05-14 15:13 chenguanxun 阅读(191) 评论(0) 推荐(0) 编辑
摘要: Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> while True: a = input('1:摄氏度转华氏度\n2... 阅读全文
posted @ 2018-04-23 17:00 chenguanxun 阅读(824) 评论(0) 推荐(0) 编辑
摘要: Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> a=input('请输入一个数字') 请输入一个数字555 >>> b=i... 阅读全文
posted @ 2018-04-23 15:23 chenguanxun 阅读(176) 评论(0) 推荐(0) 编辑
摘要: name1 = input(‘请输入一个名字:’) name2 = input(‘再在输入一个名字:’) vehicle = input(‘请输入一种车子:’) print(‘{}开着{}带着{}的儿子出去兜风’.format(name1,vehicle,name2)) input(‘press any key’) 阅读全文
posted @ 2018-04-16 16:04 chenguanxun 阅读(306) 评论(0) 推荐(0) 编辑