Advertisement
Enrro

pyramid 100433

Oct 4th, 2014
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. '''
  2. Created on 04/10/2014
  3. funcion para una piramide con x escalones
  4. @author: A01221672
  5. '''
  6. from tkinter import *
  7. import math
  8. def pyramid(stairs):
  9. ventana = Tk()
  10. width =400
  11. height = 400
  12. lienzo =Canvas(ventana, width= width, height=height)
  13. lienzo.pack()
  14.  
  15. for y in range(0,height,int((height/stairs))):
  16. lienzo.create_line(0+y/2,height-y,
  17. width-y/2,height-y)
  18.  
  19.  
  20. pyramid(5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement