2018年6月11日

摘要: #1 kkFile = open('kk.txt','r') kkTest = kkFile.read() kkFile.close() print(kkTest) #2 print(kkTest.replace(',',' ')) print(kkTest.replace("'",' ')) print(kkTest) #3 print(kkTest.split(' ')) kkList = ... 阅读全文
posted @ 2018-06-11 17:04 rabbitank 阅读(185) 评论(0) 推荐(0)

2018年6月4日

摘要: import turtle turtle.speed(21) colors = ['red','purple','blue','green','yellow','orange'] for i in range(200): turtle.pencolor(colors[i%6]) turtle.forward(i) turtle.left(59) turtle.done... 阅读全文
posted @ 2018-06-04 16:35 rabbitank 阅读(429) 评论(0) 推荐(0)

2018年5月14日

摘要: import turtle while True: turtle.forward(150) turtle.right(100) if abs (turtle.pos())<1: break turtle.done() 阅读全文
posted @ 2018-05-14 15:31 rabbitank 阅读(143) 评论(0) 推荐(0)
摘要: import turtle while True: turtle.forward(150) turtle.right(100) if abs (turtle.pos())<1: break turtle.done() 阅读全文
posted @ 2018-05-14 15:24 rabbitank 阅读(96) 评论(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, ... 阅读全文
posted @ 2018-05-07 16:56 rabbitank 阅读(125) 评论(0) 推荐(0)
摘要: myNum = 6 print('猜数字游戏\n') while True: guess=int(input('请输入一个数,大于1小于10:')) if guess > myNum: print('猜大了') elif guess < myNum: print('猜小了') else: print('恭喜你,猜对... 阅读全文
posted @ 2018-05-07 15:52 rabbitank 阅读(88) 评论(0) 推荐(0)

2018年4月23日

摘要: >>> a=input('请输入一个数字') 请输入一个数字233 >>> b=input('请输入另一个数') 请输入另一个数666 >>> sum1=int(a)+int(b) >>> print('二数之和是:{}'.format(sum1)) 二数之和是:899 >>> a=input('请输入摄氏温度') 请输入摄氏温度66 >>> sum1=int(a)*9/5+32 >>> pri... 阅读全文
posted @ 2018-04-23 15:28 rabbitank 阅读(183) 评论(0) 推荐(0)

2018年4月16日

摘要: 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. >>> name1=input('请输入第一个姓名') 请输入第一个姓名朱文昊 >... 阅读全文
posted @ 2018-04-16 16:12 rabbitank 阅读(148) 评论(0) 推荐(0)

导航