Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from shapes import Paper, Triangle, Rectangle, Oval
- def draw_shapes(type):
- paper=Paper()
- if type=="triangle":
- x=Triangle()
- x.randomize()
- x.draw()
- elif type=="circle":
- x=Oval()
- x.randomize
- x.draw()
- elif type=="rectangle":
- x=Rectangle()
- x.randomize()
- x.draw()
- paper.display()
- draw_shapes("circle")
- draw_shapes("triangle")
- draw_shapes("rectangle")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement