SHARE
TWEET

Untitled

a guest Sep 13th, 2017 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from DrawingPanel import *
  2. import random
  3. STEPS = (int(input("How many steps have you walked?")))
  4.  
  5.  
  6. def main():
  7.     full_flowers = STEPS//5000
  8.     small_flower = STEPS % 500
  9.     z = small_flower// 1000 + 1
  10.     leaves = z - 1
  11.     flower_head = 300 - (leaves*20)
  12.     panel = DrawingPanel(500,300, "cyan")
  13.     print(STEPS)
  14. #background(panel)
  15.     print_flower(panel,full_flowers)
  16.     little_flower(leaves,flower_head)
  17.  
  18.  
  19. def print_flower(panel,full_flowers):
  20.  
  21.     for line in range(full_flowers):
  22.         ran = random.randomint(0,500)
  23.         panel.draw_line(ran,170,ran,300,"dark green",width = 5)
  24.         for i in range(5):
  25.             panel.draw_line(ran,(290 - (20*(i + 1))),ran + 10, (280-(20*(i + 1))),"dark green", width = 5)
  26.         #for i in range(5):
  27.             panel.draw_line(ran,(300 - (20*(i + 1))),ran + 10, (290-(20*(i + 1))),"dark green", width = 5)
  28.  
  29.         #panel.fill_oval(ran - 25, 170, 50, -50,"red")
  30.        # panel.fill_oval(ran - 5,140,10,10,"black")
  31.  
  32. def little_flower(panel,leaves,a):
  33.  
  34.     ran = random.randint(0,500)
  35.     panel.draw_line(ran,a - 30,ran,300,"dark green", width = 5)
  36.     for i in range(leaves):
  37.         panel.draw_line(ran, (290 - (20*(i+1))),ran + 10, (280-(20*(i+1))), "dark green", width = 5)
  38.     for i in range(leaves):
  39.         panel.draw_line(ran, (390 - (20*(i+1))),ran - 10, (290-(20*(i+1))), "dark green", width = 5)
  40.     panel.fill_oval(ran - 25, a - 30,50,-50,"red")
  41.     panel.fill_oval(ran - 5,a-50,10,-10,"black")
  42.    
  43.                    
  44.        
  45.  
  46.                
  47. main()
RAW Paste Data
Top