Срочно З допомогою черепашки нарисуйте будинок в Python –
Junior
Ответы
Ответ:
import turtle
up()
goto(-200,0)
down()
color('black','orange')
begin_fill()
right(90)
forward(200)
left(90)
forward(400)
left(90)
forward(200)
left(90)
forward(400)
end_fill()
color('black','green')
begin_fill()
right(120)
forward(125)
right(120)
forward(125)
right(120)
forward(125)
end_fill()
left(180)
forward(125)
right(90)
forward(200)
up()
goto(-135,107)
down()
left(90)
forward(273)
color('black','green')
begin_fill()
right(120)
forward(125)
left(120)
forward(125)
left(120)
forward(125)
end_fill()
up()
right(240)
forward(125)
left(120)
right(90)
down()
forward(200)
up()
goto(-50,-200)
down()
left(180)
color('black','brown')
begin_fill()
forward(125)
right(90)
forward(80)
right(90)
forward(125)
end_fill()
up()
goto(-47,-150)
down()
circle(5)
up()
goto(-175,-150)
down()
left(180)
color('black','blue')
begin_fill()
forward(75)
right(90)
forward(45)
right(90)
forward(75)
right(90)
forward(45)
end_fill()
left(180)
forward(22)
left(90)
forward(75)
up()
goto(-115,50)
down()
color('black','blue')
begin_fill()
circle(25)
end_fill()
up()
goto(50,75)
down()
color('black','grey')
begin_fill()
forward(75)
right(90)
forward(45)
right(90)
forward(75)
right(90)
forward(45)
end_fill()
up()
goto(150,175)
down()
circle(10)
up()
goto(225,250)
down()
circle(30)
up()
goto(300,300)
down()
circle(40)
Объяснение: