how to make a birdhouse in python

Solutions on MaxInterview for how to make a birdhouse in python by the best coders in the world

showing results for - "how to make a birdhouse in python"
Mirko
01 Oct 2020
1import turtle
2wn = turtle.Screen()
3wn.bgcolor("white")
4arrow = turtle.Turtle()
5arrow.pensize(6)
6arrow.color("brown")
7arrow.setpos(-50, 0)
8arrow.fillcolor("green")
9arrow.begin_fill()
10for i in [0, 1, 2]:               
11    arrow.forward(100)
12    arrow.left(120)
13arrow.end_fill()
14arrow.forward(10)
15arrow.right(90)
16arrow.fillcolor("blue")
17arrow.begin_fill()
18for v in [0, 1, 2]:
19  arrow.fd(80)
20  arrow.left(90)
21arrow.end_fill()
22arrow.penup()
23arrow.fd(50)
24arrow.left(90)
25arrow.fd(30)
26arrow.pendown()
27arrow.color("Black")
28arrow.fillcolor("Black")
29arrow.begin_fill()
30arrow.circle(10,360)
31arrow.end_fill()
32arrow.penup()
33arrow.pensize(20)
34arrow.color("brown")
35arrow.setheading(270)
36arrow.forward(50)
37arrow.setheading(180)
38arrow.forward(33)
39arrow.pendown()
40arrow.forward(15)
41arrow.setheading(0)
42arrow.forward(115)
43arrow.setheading(180)
44arrow.forward(65)
45arrow.setheading(270)
46arrow.forward(110)
47arrow.setheading(90)
48arrow.forward(50)
49arrow.setheading(180)
50arrow.color('green')
51arrow.begin_fill()
52arrow.forward(184)
53arrow.setheading(270)
54arrow.forward(54)
55arrow.setheading(0)
56arrow.forward(184)
57arrow.forward(202)
58arrow.setheading(90)
59arrow.forward(54)
60arrow.setheading(180)
61arrow.forward(202)
62arrow.end_fill()
63arrow.color("brown")
64arrow.setheading(90)
65arrow.forward(10)
66arrow.setheading(270)
67arrow.forward(55)
68arrow.penup()
69arrow.setheading(0)
70arrow.forward(65)
71arrow.setheading(90)
72arrow.forward(120)
73arrow.setheading(0)
74arrow.forward(30)
75arrow.setheading(90)
76arrow.forward(200)
77arrow.setheading(0)
78arrow.forward(30)
79arrow.setheading(90)
80arrow.setheading(180)
81arrow.forward(230)
82arrow.setheading(90)