Guest User

Untitled

a guest
Nov 22nd, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. from graphics import *
  2.  
  3.  
  4.  
  5. def Main():
  6.  
  7.  
  8. valid = False
  9. while not valid:
  10.  
  11. sizeInput= eval(input("PLease select a size, 7, 9, 11: "))
  12. if sizeInput == 7 or sizeInput == 9 or sizeInput == 11 :
  13. size= sizeInput*100
  14. valid=True
  15.  
  16. else:
  17. print("Invalid Number")
  18.  
  19. Draw(size)
  20.  
  21. def Draw(size):
  22. win = GraphWin("Pat1",size,size)
  23. PointX= Point(0,0)
  24. PointY= Point(700,70)
  25.  
  26. line = Line(PointX,PointY)
  27. i = 0
  28. while i<10:
  29. line.draw(win)
  30. PointX.x+70
  31. PointY.y+70
  32. i=i+1
  33.  
  34. `
Add Comment
Please, Sign In to add comment