Advertisement
Guest User

UseCoulur

a guest
Dec 9th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. def finalDigitPicture():
  2. win = GraphWin("PenUltimate",300,300)
  3. win.setBackground("white")
  4.  
  5.  
  6. for x in range(0,100,40):
  7. for y in range(0,100,40):
  8. circle = Circle(Point(x+10,y+10),10)
  9. circle.setFill("red")
  10. circle.draw(win)
  11.  
  12. triangle = Polygon(Point(x+20,y+0),Point(x+10,y+10),Point(x+20,y+20))
  13. triangle.setOutline("White")
  14. triangle.setFill("White")
  15. triangle.draw(win)
  16.  
  17.  
  18. for x in range(0,80,40):
  19. for y in range(0,100,40):
  20. square = Rectangle(Point(x+20,y+0),Point(x+40,y+20))
  21. square.setOutline("")
  22. square.setFill("Red")
  23. square.draw(win)
  24.  
  25.  
  26.  
  27.  
  28. for x in range(0,100,40):
  29. for y in range(0,80,40):
  30. square = Rectangle(Point(x+0,y+20),Point(x+20,y+40))
  31. square.setOutline("")
  32. square.setFill("Red")
  33. square.draw(win)
  34.  
  35. for x in range(0,80,40):
  36. for y in range(0,80,40):
  37. circle = Circle(Point(x+30,y+30),10)
  38. circle.setFill("red")
  39. circle.draw(win)
  40.  
  41. triangle = Polygon(Point(x+30,y+30),Point(x+20,y+20),Point(x+20,y+40))
  42. triangle.setOutline("White")
  43. triangle.setFill("White")
  44. triangle.draw(win)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement