Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- Created on 24/10/2014
- Cuadrados en diagonales
- Proven and tested on python 3.3.3
- @author: A01221672
- '''
- from tkinter import *
- import random
- ventana=Tk()
- largo = 1000
- ancho = 1000
- lienzo=Canvas(ventana,width=largo,height=ancho)
- lienzo.pack()
- foo = ["#7D735A","#DBAA6F","#FFCE6F","#FCE190","#1C343E"]
- bar = ["#FE4365","#FC9D9A","#F9CDAD","#C8C8A9","#83AF9B"]
- neo = ["#5F6D92","#0F3B56","#010005","#CEC5A4","#8199BF"]
- hig = 0
- for x in range(0,largo,int(largo/100)):
- for y in range(0,ancho, int(ancho/100)):
- if x == y:
- color = bar[hig]
- lienzo.create_rectangle(0+x,0+y,10+x,10+y, fill = color)
- lienzo.create_rectangle(x,largo-y,10+x,largo-y+10, fill = color)
- hig = hig+1
- if hig%5==0:
- hig =0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement