mnbn.net
当前位置:首页 >> DrAw turtlE >>

DrAw turtlE

import turtle#draw first circleturtle.penup()turtle.goto(0,-200)turtle.pendown()turtle.circle(200)#draw second circleturtle.penup()turtle.goto(0,-150)turtle.pendown()turtle.circle(150)#draw third circleturtle.penup()turtle.goto...

import turtle def draw(x,y): turtle.clear() while True: turtle.forward(200) turtle.left(144) if abs(turtle.pos()) < 1: break draw(0,0) turtle.onscreenclick(draw) turtle.mainloop()

import turtledef draw(x,y): turtle.clear() while True: turtle.forward(200) turtle.left(144) if abs(turtle.pos()) < 1: breakdraw(0,0)turtle.onscreenclick(draw)turtle.mainloop()

是要表白么,嘿嘿,希望这个代码能帮到你哦~(参数不满意可以自己调) import turtleimport mathwn = turtle.Screen()wn.setworldcoordinates(-2, -2, 2, 2)alex = turtle.Turtle()alex.color("red")alex.pensize(2)alex.penup()alex.speed(0)wa...

python turtle画4个同心圆方法 import turtle #draw first circle turtle.penup() turtle.goto(0,-200) turtle.pendown() turtle.circle(200) #draw second circle turtle.penup() turtle.goto(0,-150) turtle.pendown() turtle.circle(150) #dr...

% 取模不能用浮点数, frequence 要转成整型来取模,小数位可以乘10后转整型来得到。

1 DRAW 清屏、复位、进入图文混合显示状态 2 CLEARSCREEN 简写 CS 清屏、复位 3 SHOW TURTLE 简写 ST 显龟命令 4 HIDETURTLE 简写 HT 隐龟命令 5 FORWARD ...

网站首页 | 网站地图
All rights reserved Powered by www.mnbn.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com