from turtle import*
from random import*
setup(5000,3300,10,10)
#设置初始位置
penup()
goto(-250,250)
pendown()
#画布布置
#1
fillcolor("midnightblue")
begin_fill()
fd(330)
right(90)
fd(50)
right(90)
fd(330)
right(90)
fd(50)
end_fill()
right(180)
fd(50)
#2
fillcolor("Navy")
begin_fill()
fd(80)
left(90)
fd(330)
left(90)
fd(80)
end_fill()
left(180)
fd(80)
#5
fillcolor("BlueViolet")
begin_fill()
fd(75)
right(90)
fd(330)
right(90)
fd(75)
end_fill()
right(180)
fd(75)
#8
fillcolor("DeepPink")
begin_fill()
fd(65)
left(90)
fd(330)
left(90)
fd(65)
end_fill()
left(180)
fd(65)
#10
fillcolor("Coral")
begin_fill()
fd(60)
right(90)
fd(330)
right(90)
fd(60)
end_fill()
right(180)
fd(60)
#12
fillcolor("Moccasin")
begin_fill()
fd(40)
left(90)
fd(330)
left(90)
fd(40)
end_fill()
left(180)
fd(40)
#14
fillcolor("NavajoWhite")
begin_fill()
fd(70)
right(90)
fd(330)
right(90)
fd(70)
end_fill()
right(180)
fd(70)
#画星星
pencolor("white")
pensize(1)
for i in range(330):
a=randint(-250,90)
b=randint(-190,350)
pencolor("white")
penup()
goto(a,b)
pendown()
fd(2)
#画房子
penup()
goto(-250,10)
pendown()
pensize(6)
pencolor("black")
fillcolor("black")
begin_fill()
seth(0)
fd(100)
seth(45)
fd(20)
right(90)
fd(9)
right(95)
fd(23)
seth(270)
fd(70)
seth(0)
fd(75)
right(90)
fd(50)
left(90)
fd(73)
right(90)
fd(43)
seth(0)
fd(78)
seth(270)
fd(30)
seth(180)
fd(330)
seth(90)
fd(192)
end_fill()
#画电线杆
#1
penup()
goto(-100,-60)
pendown()
pensize(10)
seth(90)
fd(240)
seth(270)
fd(10)
seth(0)
fd(32)
seth(180)
fd(53)
seth(0)
fd(24)
seth(270)
penup()
fd(77)
pendown()
seth(0)
fd(60)
seth(180)
fd(112)
penup()
seth(0)
fd(15)
pendown()
seth(270)
fd(3)
#2
penup()
goto(-37,-110)
pendown()
pensize(7)
seth(90)
fd(160)
penup()
seth(270)
fd(30)
pendown()
seth(0)
fd(28)
seth(180)
fd(53)
penup()
seth(90)
fd(16)
seth(0)
fd(13)
pendown()
fd(28)
#3
penup()
goto(43,-153)
pendown()
pensize(5)
seth(90)
fd(148)
penup()
seth(270)
fd(10)
pendown()
seth(180)
fd(10)
seth(0)
fd(14)
penup()
seth(270)
fd(10)
pendown()
seth(180)
fd(29)
#画电线
#1
seth(0)
fd(10)
seth(146)
fd(79)
#2
penup()
goto(44,-22)
seth(160)
pendown()
fd(111)
#3
penup()
goto(42,-10)
seth(148)
pendown()
fd(83)
#4
penup()
goto(-249,240)
pendown()
seth(332)
fd(159)
#5
penup()
goto(-248,148)
pendown()
seth(341)
fd(187)
#6
seth(302)
fd(57)
#7
penup()
goto(-40,33)
pendown()
seth(166)
fd(56)
#8
penup()
goto(-36,33)
seth(103)
pendown()
fd(71)
#9
penup()
goto(-140,85)
pendown()
seth(251)
fd(99)
#画草
#1
pencolor("black")
for i in range(30):
pensize(2)
n=randint(-45,-23)
m=randint(0,180)
k=randint(10,25)
penup()
goto(n,-115)
pendown()
seth(m)
fd(k)
#2
for i in range(20):
pensize(2)
j=randint(12,65)
m=randint(0,180)
k=randint(10,33)
penup()
goto(j,-157)
pendown()
seth(m)
fd(k)
#画流星
pencolor("white")
for i in range(8):
pensize(1)
c=randint(-250,130)
d=randint(50,290)
x=randint(70,80)
y=randint(210,230)
penup()
goto(c,d)
pendown()
seth(y)
fd(x)
##############
#画布2布置
penup()
goto(80,250)
pendown()
fillcolor("darkorange")
begin_fill()
seth(0)
fd(300)
seth(270)
fd(220)
seth(180)
fd(300)
seth(90)
fd(220)
end_fill()
#
penup()
goto(380,30)
pendown()
fillcolor("SandyBrown")
begin_fill()
seth(270)
fd(220)
seth(180)
fd(300)
seth(90)
fd(220)
end_fill()
#画夕阳
penup()
goto(333,221)
pendown()
fillcolor("LightYellow")
begin_fill()
circle(18,360)
end_fill()
#画房子
pencolor("black")
penup()
goto(380,199)
pendown()
fillcolor("black")
begin_fill()
seth(209)
fd(213)
seth(270)
fd(30)
seth(0)
fd(46)
seth(270)
fd(65)
seth(180)
fd(69)
seth(270)
fd(63)
seth(0)
fd(69)
seth(270)
fd(30)
seth(180)
fd(71)
seth(270)
fd(30)
seth(0)
fd(39)
seth(270)
fd(27)
seth(180)
fd(86)
seth(123)
fd(54)
seth(255)
fd(51)
seth(270)
fd(40)
seth(0)
fd(299)
seth(90)
fd(388)
end_fill()
#画电线杆
#1
penup()
goto(103,-154)
pendown()
pensize(5)
seth(90)
fd(148)
penup()
seth(270)
fd(10)
pendown()
seth(180)
fd(15)
seth(0)
fd(24)
penup()
seth(270)
fd(10)
pendown()
seth(180)
fd(29)
#2
penup()
goto(140,-154)
pendown()
pensize(7)
seth(90)
fd(220)
penup()
seth(270)
fd(40)
pendown()
seth(0)
fd(28)
seth(180)
fd(53)
penup()
seth(90)
fd(16)
seth(0)
fd(13)
pendown()
fd(28)
#画电线
pensize(3)
penup()
seth(180)
fd(6)
pendown()
seth(39)
fd(54)
#*
penup()
seth(0)
fd(18)
seth(270)
fd(9)
pendown()
seth(216)
fd(69)
#**
penup()
seth(270)
fd(5)
seth(180)
fd(21)
pendown()
seth(244)
fd(61)
#****
penup()
seth(121)
fd(7)
pendown()
seth(69)
fd(75)
##
penup()
seth(270)
fd(16)
seth(180)
fd(9)
pendown()
seth(228)
fd(55)
#画草
for i in range(26):
pensize(2)
p=randint(123,172)
m=randint(0,180)
l=randint(10,30)
penup()
goto(p,-155)
pendown()
seth(m)
fd(l)
#画鸟
penup()
pensize(2)
goto(269,179)
pendown()
seth(25)
fd(30)
penup()
seth(205)
fd(15)
pendown()
seth(61)
fd(30)
penup()
seth(241)
fd(30)
pendown()
seth(177)
fd(28)
#
penup()
pensize(2)
goto(138,151)
pendown()
seth(25)
fd(26)
penup()
seth(205)
fd(13)
pendown()
seth(61)
fd(24)
penup()
seth(241)
fd(24)
pendown()
seth(177)
fd(22)
#
penup()
pensize(2)
goto(214,222)
pendown()
seth(20)
fd(18)
penup()
seth(200)
fd(9)
pendown()
seth(61)
fd(12)
penup()
seth(241)
fd(12)
pendown()
seth(177)
fd(16)
#
penup()
pensize(2)
goto(162,199)
pendown()
seth(25)
fd(24)
penup()
seth(205)
fd(12)
pendown()
seth(61)
fd(35)
penup()
seth(241)
fd(35)
pendown()
seth(177)
fd(38)
#
penup()
pensize(2)
goto(105,114)
pendown()
seth(25)
fd(22)
penup()
seth(205)
fd(11)
pendown()
seth(61)
fd(21)
penup()
seth(241)
fd(21)
pendown()
seth(177)
fd(24)
#
penup()
pensize(2)
goto(85,59)
pendown()
seth(20)
fd(18)
penup()
seth(200)
fd(9)
pendown()
seth(61)
fd(12)
penup()
seth(241)
fd(12)
pendown()
seth(177)
fd(16)
#
penup()
pensize(2)
goto(92,236)
pendown()
seth(20)
fd(18)
penup()
seth(200)
fd(9)
pendown()
seth(61)
fd(12)
penup()
seth(241)
fd(12)
pendown()
seth(177)
fd(16)
#
penup()
pensize(2)
goto(174,82)
pendown()
seth(20)
fd(18)
penup()
seth(200)
fd(9)
pendown()
seth(61)
fd(12)
penup()
seth(241)
fd(12)
pendown()
seth(177)
fd(16)
#
penup()
pensize(2)
goto(210,120)
pendown()
seth(20)
fd(18)
penup()
seth(200)
fd(9)
pendown()
seth(61)
fd(12)
penup()
seth(241)
fd(12)
pendown()
seth(177)
fd(16)
#
penup()
pensize(2)
goto(94,186)
pendown()
seth(20)
fd(18)
penup()
seth(200)
fd(9)
pendown()
seth(61)
fd(12)
penup()
seth(241)
fd(12)
pendown()
seth(177)
fd(16)
###3
penup()
goto(400,400)
pendown()