用python绘图

2020-12-13 06:24

阅读:611

标签:com   gre   setup   col   ima   set   mic   done   绘制   

绘制五角星

import turtle as t

t.setup()
t.penup()
t.fd(-100)
t.pendown()
t.pensize(10)
t.pencolor("green")
t.circle(1,36)
t.fd(200)
t.circle(1,-144)
t.fd(200)
t.circle(1,-144)
t.fd(200)
t.circle(1,-144)
t.fd(200)
t.circle(1,-144)
t.fd(200)
t.right(150)

t.done()

技术图片

绘制笑脸

import turtle as t

t.setup()
t.penup()
t.fd(-100)
t.pendown()
t.pensize(10)
t.pencolor("green")

t.circle(50,360)
t.circle(100,360)
t.circle(20,360)
t.circle(10,360)
t.circle(5,360)
t.right(150)
t.circle(50,360)
t.circle(100,360)
t.circle(20,360)
t.circle(10,360)
t.circle(5,360)
t.penup()
t.fd(300)
t.pendown()
t.left(-280)
t.circle(300,360)
t.penup()
t.left(150)
t.fd(200)
t.pendown()
t.right(200)
t.circle(100,100)
t.penup()
t.left(80)
t.fd(100)
t.pendown()
t.circle(10,360)
t.circle(5,360)
t.circle(20,360)


t.done()

技术图片

用python绘图

标签:com   gre   setup   col   ima   set   mic   done   绘制   

原文地址:https://www.cnblogs.com/chenziqing/p/11178097.html


评论


亲,登录后才可以留言!