Advertisement
Enrro

Cuadrados en diagonales102433

Oct 24th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. '''
  2. Created on 24/10/2014
  3. Cuadrados en diagonales
  4. Proven and tested on python 3.3.3
  5. @author: A01221672
  6. '''
  7.  
  8. from tkinter import *
  9. import random
  10.  
  11. ventana=Tk()
  12. largo = 1000
  13. ancho = 1000
  14. lienzo=Canvas(ventana,width=largo,height=ancho)
  15. lienzo.pack()
  16. foo = ["#7D735A","#DBAA6F","#FFCE6F","#FCE190","#1C343E"]
  17. bar = ["#FE4365","#FC9D9A","#F9CDAD","#C8C8A9","#83AF9B"]
  18. neo = ["#5F6D92","#0F3B56","#010005","#CEC5A4","#8199BF"]
  19. hig = 0
  20.  
  21. for x in range(0,largo,int(largo/100)):
  22. for y in range(0,ancho, int(ancho/100)):
  23. if x == y:
  24. color = bar[hig]
  25. lienzo.create_rectangle(0+x,0+y,10+x,10+y, fill = color)
  26. lienzo.create_rectangle(x,largo-y,10+x,largo-y+10, fill = color)
  27. hig = hig+1
  28. if hig%5==0:
  29. hig =0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement