Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random, turtle
- speed(0)
- def large_mountain():
- penup()
- setposition(-125,0)
- pendown()
- begin_fill()
- color("#c6ccc6")
- pensize(10)
- while ycor() <= 150:
- length=random.randint(5,15)
- angle=random.randint(40,45)
- left(angle)
- forward(length)
- right(angle)
- if ycor() >= 150:
- break
- while ycor() >= 0:
- pensize(1)
- color("#878c88")
- length=random.randint(5,15)
- angle=random.randint(40,45)
- right(angle)
- forward(length)
- left(angle)
- if ycor() <= 0:
- break
- end_fill()
- def small_long_mountain():
- penup()
- setposition(-75,0)
- pendown()
- begin_fill()
- pensize(10)
- color("#6d8f6d")
- while ycor() <= 50:
- length=random.randint(5,10)
- angle=random.randint(35,40)
- left(angle)
- forward(length)
- right(angle)
- if ycor() >= 50:
- break
- while ycor() >= 0:
- pensize(1)
- color("#5b6e5f")
- length=random.randint(5,10)
- angle=random.randint(35,40)
- right(angle)
- forward(length)
- left(angle)
- if ycor() <= 0:
- break
- end_fill()
- def small_mountains():
- pendown()
- begin_fill()
- pensize(10)
- color("#a9c2a9")
- while ycor() <= 50:
- length=random.randint(5,10)
- angle=random.randint(48,52)
- left(angle)
- forward(length)
- right(angle)
- if ycor() >= 50:
- break
- while ycor() >= 30:
- color("#a9c2a9")
- length=random.randint(5,10)
- angle=random.randint(48,52)
- right(angle)
- forward(length)
- left(angle)
- if ycor() <= 30:
- break
- while ycor() <= 75:
- color("#a9c2a9")
- length=random.randint(5,10)
- angle=random.randint(48,52)
- left(angle)
- forward(length)
- right(angle)
- if ycor() >= 75:
- break
- while ycor() >= 0:
- color("#6e8a73")
- pensize(1)
- color("#6e8a73")
- length=random.randint(5,10)
- angle=random.randint(48,52)
- right(angle)
- forward(length)
- left(angle)
- if ycor() <= 0:
- break
- end_fill()
- def large_mountain_flipped():
- penup()
- setposition(-125,-10)
- pendown()
- begin_fill()
- color("#c6ccc6")
- pensize(10)
- while ycor() >= -150:
- length=random.randint(5,15)
- angle=random.randint(40,45)
- right(angle)
- forward(length)
- left(angle)
- if ycor() >= 150:
- break
- while ycor() <= -10:
- pensize(1)
- color("#878c88")
- length=random.randint(5,15)
- angle=random.randint(40,45)
- left(angle)
- forward(length)
- right(angle)
- if ycor() >= -10:
- break
- end_fill()
- def small_long_mountain_flipped():
- penup()
- setposition(-75,-10)
- pendown()
- begin_fill()
- pensize(10)
- color("#6d8f6d")
- while ycor() >= -60:
- length=random.randint(5,10)
- angle=random.randint(35,40)
- right(angle)
- forward(length)
- left(angle)
- if ycor() <= -60:
- break
- while ycor() <= -10:
- color("#5b6e5f")
- pensize(1)
- length=random.randint(5,10)
- angle=random.randint(35,40)
- left(angle)
- forward(length)
- right(angle)
- if ycor() >= -10:
- break
- end_fill()
- def small_mountains_flipped():
- pendown()
- begin_fill()
- pensize(10)
- color("#a9c2a9")
- while ycor() >= -60:
- length=random.randint(5,10)
- angle=random.randint(48,52)
- right(angle)
- forward(length)
- left(angle)
- if ycor() <= -60:
- break
- while ycor() <= -40:
- length=random.randint(5,10)
- angle=random.randint(48,52)
- left(angle)
- forward(length)
- right(angle)
- if ycor() >= -40:
- break
- while ycor() >= -85:
- length=random.randint(5,10)
- angle=random.randint(48,52)
- right(angle)
- forward(length)
- left(angle)
- if ycor() <= -85:
- break
- while ycor() <= -10:
- color("#6e8a73")
- pensize(1)
- length=random.randint(5,10)
- angle=random.randint(48,52)
- left(angle)
- forward(length)
- right(angle)
- if ycor() >= -10:
- break
- end_fill()
- def complete_mountain_and_reflection():
- large_mountain()
- small_long_mountain()
- small_mountains()
- penup()
- home()
- pendown()
- large_mountain_flipped()
- small_long_mountain_flipped()
- small_mountains_flipped()
- complete_mountain_and_reflection()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement