猫史档案馆


【Python作品分享】荒野帐篷【作业帖】

用户:木木念_永退木木念_永退查看:0 回复:0 评论:0 创建时间:2023-12-17T15:06:23


【作品展示】

center_image

 

【作品介绍】

114514

 

【作品源代码】

from turtle import *
from time import *
import math


def start():
    up()
    sleep(1)
    clear()
    speed(0)
    goto(0,0)
    seth(0)
    pensize(5)
    color("pink")
    down()


start()
# 房区
pensize(30)
color("green")
fd(500)
up()
pensize(15)
goto(0,0)
seth(90)
fd(40)
seth(0)
color("brown")
down()
fd(500)
up()
goto(0,0)
seth(90)
fd(60)
seth(0)
for i in range(5):
    fd(450/5)
    seth(270)
    down()
    fd(60)
    bk(60)
    seth(0)
    up()
goto(0,0)
seth(0)
fd(200)
color("#996633")
seth(90)
down()
fd(120)
seth(0)
bk(30)
color("#114514")
begin_fill()
for i in range(3):
    fd(75)
    left(120)
end_fill()
left(60)
fd(75)
seth(0)
bk(25)
begin_fill()
for i in range(3):
    fd(55)
    left(120)
end_fill()
left(60)
fd(55)
seth(0)
bk(15)
begin_fill()
for i in range(3):
    fd(35)
    left(120)
end_fill()
up()
goto(0,0)
seth(0)
fd(300)
fd(50)
pensize(35)
color("yellow")
seth(90)
fd(30)
seth(0)
fd(75)
color("blue")
down()
seth(90)
fd(100)
color("blue")
seth(45)
fd(30)
bk(30)
up()
seth(90)
bk(100)
seth(0)
bk(75)
color("yellow")
down()
begin_fill()
fd(150)
goto(xcor()-75 , ycor()+75)
goto(xcor()-75 , ycor()-75)
end_fill()
up()
goto(0,0)
seth(90)
fd(300)
down()
begin_fill()
circle(30)
end_fill()
sleep(114514)

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 0下一页