how to make a birdhouse in python code example
Example: how to make a birdhouse in python
import turtle
wn = turtle.Screen()
wn.bgcolor("white")
arrow = turtle.Turtle()
arrow.pensize(6)
arrow.color("brown")
arrow.setpos(-50, 0)
arrow.fillcolor("green")
arrow.begin_fill()
for i in [0, 1, 2]:
arrow.forward(100)
arrow.left(120)
arrow.end_fill()
arrow.forward(10)
arrow.right(90)
arrow.fillcolor("blue")
arrow.begin_fill()
for v in [0, 1, 2]:
arrow.fd(80)
arrow.left(90)
arrow.end_fill()
arrow.penup()
arrow.fd(50)
arrow.left(90)
arrow.fd(30)
arrow.pendown()
arrow.color("Black")
arrow.fillcolor("Black")
arrow.begin_fill()
arrow.circle(10,360)
arrow.end_fill()
arrow.penup()
arrow.pensize(20)
arrow.color("brown")
arrow.setheading(270)
arrow.forward(50)
arrow.setheading(180)
arrow.forward(33)
arrow.pendown()
arrow.forward(15)
arrow.setheading(0)
arrow.forward(115)
arrow.setheading(180)
arrow.forward(65)
arrow.setheading(270)
arrow.forward(110)
arrow.setheading(90)
arrow.forward(50)
arrow.setheading(180)
arrow.color('green')
arrow.begin_fill()
arrow.forward(184)
arrow.setheading(270)
arrow.forward(54)
arrow.setheading(0)
arrow.forward(184)
arrow.forward(202)
arrow.setheading(90)
arrow.forward(54)
arrow.setheading(180)
arrow.forward(202)
arrow.end_fill()
arrow.color("brown")
arrow.setheading(90)
arrow.forward(10)
arrow.setheading(270)
arrow.forward(55)
arrow.penup()
arrow.setheading(0)
arrow.forward(65)
arrow.setheading(90)
arrow.forward(120)
arrow.setheading(0)
arrow.forward(30)
arrow.setheading(90)
arrow.forward(200)
arrow.setheading(0)
arrow.forward(30)
arrow.setheading(90)
arrow.setheading(180)
arrow.forward(230)
arrow.setheading(90)