python第一次作业

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

python第一次作业

宋世豪   2020-03-15 我要评论
import turtle
turtle.pensize(2)
turtle.pencolor("black")
turtle.fillcolor("red")

turtle.begin_fill()
for i in range(5):
    turtle.forward(300)
    turtle.right(144)
turtle.end_fill()

import turtle
turtle.pensize(2)
turtle.pencolor("black")
turtle.fillcolor("red")

turtle.begin_fill()
turtle.left(90)
turtle.fd(100)
for i in range(2):
    turtle.right(120)
    turtle.fd(300)
turtle.right(120)
turtle.fd(200)

turtle.right(60)
turtle.fd(200)
for i in range(2):
    turtle.right(120)
    turtle.fd(300)
turtle.right(120)
turtle.fd(100)
turtle.end_fill()

import turtle
t = turtle
t.pensize(2)
t.pencolor("black")
t.fillcolor("yellow")

t.begin_fill()
t.fd(200)
for i in range(2):
    t.right(120)
    t.fd(200)

t.right(60)
t.fd(200)
for i in range(2):
    t.right(120)
    t.fd(400)
t.right(120)
t.fd(200)
t.end_fill()

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们