摘要: def move(n,a,b,c): if n == 1: print(a," >",c) else: move(n-1,a,c,b) print(a," >",c) move(n-1,b,a,c)move(4,"A","B","C") n=4arr11 = arr1 = [_ for _ in r 阅读全文
posted @ 2020-03-31 12:51 椰汁面包 阅读(87) 评论(0) 推荐(0) 编辑
摘要: import math import time scale=14 s,m,=1,2 print("执行开始".center(scale//2, "-")) start = time.perf_counter() for i in range(scale+1): s=math.sqrt((1-math 阅读全文
posted @ 2020-03-25 15:16 椰汁面包 阅读(151) 评论(0) 推荐(0) 编辑
摘要: from turtle import* def nose(x,y):#鼻子 penup()#提起笔 goto(x,y)#定位 pendown()#落笔,开始画 setheading(-30)#将乌龟的方向设置为to_angle/为数字(0-东、90-北、180-西、270-南) begin_fill 阅读全文
posted @ 2020-03-18 18:02 椰汁面包 阅读(141) 评论(0) 推荐(0) 编辑
摘要: #五角星的绘制 import turtle turtle.fillcolor("red")turtle.begin_fill() while True: turtle.forward(220) turtle.right(144) if abs(turtle.pos()) < 1: break tur 阅读全文
posted @ 2020-03-11 16:01 椰汁面包 阅读(79) 评论(0) 推荐(0) 编辑
摘要: #六角形的绘制 import turtle turtle.left(30)turtle.forward(144) turtle.right(60)turtle.forward(144) turtle.right(60)turtle.forward(144) turtle.right(60)turtl 阅读全文
posted @ 2020-03-11 15:53 椰汁面包 阅读(234) 评论(0) 推荐(0) 编辑
摘要: #叠加等边三角形绘制 import turtle as tt.pencolor("blue") #笔触为蓝色#绘制外部大三角形t.fd(200)t.seth(120)t.fd(200)t.seth(-120)t.fd(200)#绘制内部小三角形t.seth(0)t.fd(100)t.seth(60) 阅读全文
posted @ 2020-03-11 15:48 椰汁面包 阅读(322) 评论(0) 推荐(0) 编辑