Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.75 KB | None | 0 0
  1. speed(0)
  2. bgcolor((0,235,260,0.5))
  3. penup()
  4. x=-290
  5. y=100
  6. setposition(x,y)
  7. r=220
  8. setposition(-200,0)
  9.  
  10. #this function makes the sky
  11. def rectangle(color_choice):
  12.     begin_fill()
  13.     color(color_choice)
  14.     for i in range(8):
  15.         forward(400)
  16.         left(90)
  17.     end_fill()
  18.     left(90)
  19.     forward(13)
  20.     right(90)
  21.    
  22.    
  23. for i in range(16):    
  24.     r=r-10
  25.     rectangle((r,225,255))
  26.    
  27.  
  28.    
  29.    
  30.  
  31. penup()
  32. setposition(-190,150)
  33.  
  34. def clouds(size):
  35.     for i in range(4):
  36.         pendown()
  37.         right(180)
  38.         color("white")
  39.         begin_fill()
  40.         backward(size)
  41.         right(90)
  42.         circle(size/9,100,0)
  43.         right(90)
  44.         circle(size/5,120,0)
  45.         right(90)
  46.         circle(size/6,146,0)
  47.         right(90)
  48.         circle(size/1.9,30,0)
  49.         end_fill()
  50.         right(216)
  51.         size=size-10        
  52.         forward(size)
  53. def theclouds():
  54.     clouds(60)
  55.     penup()
  56.     setposition(-50,140)
  57.     clouds(30)
  58.     clouds(60)
  59.     penup()
  60.     setposition(-200,100)
  61.     clouds(80)
  62.     penup()
  63.     setposition(-10, 180)
  64.     clouds(30)
  65.     penup()
  66.     setposition(0,0)
  67.    
  68. theclouds()
  69.  
  70.  
  71.  
  72. def cloud_mountain(size):
  73.     for i in range(4):
  74.         pendown()
  75.         right(180)
  76.         color("white")
  77.         begin_fill()
  78.         backward(size)
  79.         right(90)
  80.         circle(size/9,100,0)
  81.         right(90)
  82.         circle(size/5,120,0)
  83.         right(90)
  84.         circle(size/6,146,0)
  85.         right(90)
  86.         circle(size/1.9,30,0)
  87.         end_fill()
  88.         right(216)
  89.         size=size-10        
  90.         forward(size)
  91. def themountainclouds():
  92.     penup()
  93.     home()
  94.     setposition(-10,10)
  95.     pendown()
  96.     cloud_mountain(50)
  97.     penup()
  98.     home()
  99.     setposition(-100,10)
  100.     pendown()
  101.     cloud_mountain(40)
  102.     penup()
  103.     home()
  104.     setposition(110,10)
  105.     pendown()
  106.     cloud_mountain(60)
  107.    
  108. themountainclouds()
  109.  
  110.  
  111.  
  112.  
  113.  
  114. speed(0)
  115. penup()
  116. setposition(-200,0)
  117.  
  118. r=200
  119. def rectanglerefl(color_choice):
  120.     begin_fill()
  121.     color(color_choice)
  122.     for i in range(8):
  123.         forward(400)
  124.         right(90)
  125.     end_fill()
  126.     right(90)
  127.     forward(13)
  128.     left(90)
  129.    
  130.    
  131. for i in range(16):    
  132.     r=r-10
  133.     rectanglerefl((r,225,255))
  134.    
  135. penup()
  136. setposition(-190,-150)
  137.  
  138.  
  139.  
  140. def clouds(size):
  141.     for i in range(4):
  142.         pendown()
  143.         right(180)
  144.         color("white")
  145.         begin_fill()
  146.         backward(size)
  147.         right(90)
  148.         circle(size/9,100,0)
  149.         right(90)
  150.         circle(size/5,120,0)
  151.         right(90)
  152.         circle(size/6,146,0)
  153.         right(90)
  154.         circle(size/1.9,30,0)
  155.         end_fill()
  156.         right(216)
  157.         size=size-10        
  158.         forward(size)
  159. def theclouds():
  160.     clouds(60)
  161.     penup()
  162.     setposition(-50,-140)
  163.     clouds(30)
  164.     clouds(60)
  165.     penup()
  166.     setposition(-200,-100)
  167.     clouds(80)
  168.     penup()
  169.     setposition(-10, -180)
  170.     clouds(30)
  171.     penup()
  172.     setposition(0,0)
  173.    
  174. theclouds()
  175.  
  176.  
  177.  
  178. def cloud_mountain(size):
  179.     for i in range(4):
  180.         pendown()
  181.         right(180)
  182.         color("white")
  183.         begin_fill()
  184.         backward(size)
  185.         right(90)
  186.         circle(size/9,100,0)
  187.         right(90)
  188.         circle(size/5,120,0)
  189.         right(90)
  190.         circle(size/6,146,0)
  191.         right(90)
  192.         circle(size/1.9,30,0)
  193.         end_fill()
  194.         right(216)
  195.         size=size-10        
  196.         forward(size)
  197. def themountainclouds():
  198.     penup()
  199.     home()
  200.     setposition(-10,-10)
  201.     pendown()
  202.     cloud_mountain(50)
  203.     penup()
  204.     home()
  205.     setposition(-100,-10)
  206.     pendown()
  207.     cloud_mountain(40)
  208.     penup()
  209.     home()
  210.     setposition(110,-10)
  211.     pendown()
  212.     cloud_mountain(60)
  213.    
  214. themountainclouds()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement