llgd.net
当前位置:首页 >> 求问怎样用python/python turtlE画"心" >>

求问怎样用python/python turtlE画"心"

是要表白么,嘿嘿,希望这个代码能帮到你哦~(参数不满意可以自己调) 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...

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

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

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

import numpy as npimport numpy as np import pylab as plt from matplotlib import colors a = [[] for i in range(1000)] i = 0 while i < 1000: j = 0 while j < 1000: x = -1.8 + 0.003*i y = -1.4 + 0.0028*j z = y**2 + (-x - (y**2)**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) #绘制...

from turtle import *def curvemove(): for i in range(200): right(1) forward(1)color('red','pink') begin_fill()left(140)forward(111.65)curvemove()left(120)curvemove()forward(111.65)end_fill()done()

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