llgd.net
当前位置:首页 >> python turtlE画 >>

python turtlE画

1 import turtle #导入turtle模块 2 turtle.color("blue") #定义颜色 3 turtle.penup() #penup和pendown()设置画笔抬起或放下时是否绘制直线 4 turtle.goto(-110,-25) #初始位置以中心坐标为(0,0) 5 turtle.pendown() 6 turtle.circle(45) #绘制...

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...

turtle.speed(0) “fastest”: 0 “fast”: 10 “normal”: 6 “slow”: 3 “slowest”: 1 turtle.Turtle().screen.delay(0)就没有延迟了

1 import turtle #导入turtle模块 2 turtle.color("blue") #定义颜色 3 turtle.penup() #penup和pendown()设置画笔抬起或放下时是否绘制直线 4 turtle.goto(-110,-25) #初始位置以中心坐标为(0,0) 5 turtle.pendown() 6 turtle.circle(45) #绘制...

naive # !/usr/bin/python3.4# -*- coding: utf-8 -*-print('\n'.join([''.join([('TTybTTyb'[(x-y)%7]if((x*0.05)**2+(y*0.1)**2-1)**3-(x*0.05)**2*(y*0.1)**3

import turtlea = turtle.Turtle()def drawlove(): a.left(45) a.forward(30) a.right(45) a.forward(30) a.right(120) a.forward(110) a.penup() a.right(150) a.forward(75) a.pendown() a.left(45) a.forward(30) a.left(45) a.forward(30) a...

done()可以使窗口保持 from turtle import *color('red', 'yellow')begin_fill()while True: forward(200) left(170) if abs(pos()) < 1: breakend_fill()done()

import numpy as npimport pylab as pltfrom matplotlib import colors a = [[] for i in range(1000)] i = 0while i < 1000:j = 0while j < 1000:x = -1.8 + 0.003*iy = -1.4 + 0.0028*jz = y**2 + (-x - (y**2)**0.33333)**2if z

import turtlea = turtle.Turtle()def drawlove(): a.left(45) a.forward(30) a.right(45) a.forward(30) a.right(120) a.forward(110) a.penup() a.right(150) a.forward(75) a.pendown() a.left(45) a.forward(30) a.left(45) a.forward(30) a...

首先 import turtle? 不import没有用的啊 其次 你是想 turtle.forward(100) 吗。。

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