Advertisement
johnpentyrch

Shapes

May 3rd, 2020
689
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. from shapes import Triangle, Rectangle, Oval,Paper
  2. import time
  3. for i in range(10):
  4.     rect1 = Rectangle()
  5.     rect1.randomize()
  6.     rect1.draw()
  7.  
  8.     oval1 = Oval()
  9.     oval1.randomize()
  10.     oval1.set_color("#9a00c1")
  11.     oval1.draw()
  12.  
  13.     tri = Triangle()
  14.  
  15.     tri.randomize()
  16.     tri.draw()
  17.  
  18.     rect2 = Rectangle()
  19.     rect2.set_width(200)
  20.     rect2.set_height(100)
  21.     rect2.set_color("blue")
  22.     rect2.draw()
  23. '''  
  24.    tri2 = Triangle()
  25.    tri2.set_width(150)
  26.    tri2.set_height(45)
  27.    tri2.set_color("green")
  28.    tri2.set_x(200)
  29.    tri2.set_y(100)
  30.    tri2.draw()
  31. '''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement