Guest User

Untitled

a guest
Aug 30th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. heights = input('Heights: ')
  2. heights = list(heights.split(' '))
  3.  
  4. from turtle import *
  5. penup()
  6. goto(-200,0)
  7. pendown()
  8. fillcolor('midnightblue')
  9. begin_fill()
  10. penup()
  11. for i in range(2):
  12. forward(400)
  13. right(90)
  14. forward(150)
  15. right(90)
  16. end_fill()
  17. fillcolor('orange')
  18. begin_fill()
  19. for i in range(2):
  20. forward(400)
  21. left(90)
  22. forward(150)
  23. left(90)
  24. end_fill()
  25. pendown()
  26. fillcolor('darkslategray')
  27. for i in heights:
  28. begin_fill()
  29. for j in range(2):
  30. forward(20)
  31. left(90)
  32. forward(int(i))
  33. left(90)
  34. end_fill()
  35. forward(20)
Add Comment
Please, Sign In to add comment