Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Colour-bars-Display/Python/colour-bars-display.py
Normal file
19
Task/Colour-bars-Display/Python/colour-bars-display.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env python
|
||||
#vertical coloured stripes in window in Python 2.7.1
|
||||
|
||||
from livewires import *
|
||||
|
||||
horiz=640; vert=480
|
||||
begin_graphics(width=horiz,height=vert,title="v_stripes",background=Colour.black)
|
||||
NameColors=["black","red","green","dark_blue","purple","blue","yellow","white"]
|
||||
stepik=horiz/len(NameColors)
|
||||
|
||||
for index,each in enumerate(NameColors):
|
||||
ExcStrng="set_colour(Colour."+each+")"
|
||||
exec ExcStrng
|
||||
box(index*stepik,0,(index+1)*stepik,vert,filled=1)
|
||||
|
||||
while keys_pressed() != ['x']: # press x key to terminate program
|
||||
pass
|
||||
|
||||
end_graphics()
|
||||
Loading…
Add table
Add a link
Reference in a new issue