2022
04-20
04-20
如何用Python画一些简单形状你知道吗
目录进入主题总结进入主题1.importturtleastimportmatht.pensize(3)t.tracer(10)t.hideturtle()start_x=-200foryinrange(-150,150,5):t.penup()t.goto(start_x,y)t.pendown()forxinrange(-200,200,1):if((y-50*(math.cos(0.05*x))<=80)and(y-50*(math.cos(0.05*x))>=60)):t.pencolor('yellow')elif((y-50*(math.cos(0.05*x))<=40)and(...
继续阅读 >