from turtle import * from time import * from math import * from kandinsky import * from ion import * a=1 x=100 y=100 s=8 t=8 c='black' def table(): fill_rect(245,5,70,205,'orange') draw_string("1=blu.",250,11) draw_string("2=red",250,27) draw_string("3=gr.",250,43) draw_string("4=ye.",250,59) draw_string("5=br.",250,75) draw_string("6=bla.",250,91) draw_string("7=wh.",250,107) draw_string("8=pi.",250,123) draw_string("9=or.",250,139) draw_string("/=pu.",250,155) draw_string("*=grey",250,171) draw_string("0=cle.",250,187) fill_rect(0,213,330,2,'black') fill_rect(240,0,2,275,'black') draw_string("x",10,195) draw_string("y",230,10) table() c='white' while a==1: sleep(0.1) fill_rect(x,y,t,t,c) fill_rect(x,203,2,10,'black') fill_rect(230,y,10,2,'black') fill_rect(0,213,330,2,'black') fill_rect(240,0,2,275,'black') if keydown(KEY_LEFT) and x>5: fill_rect(x,203,2,10,'white') x=x-s fill_rect(x,203,2,10,'black') if keydown(KEY_RIGHT) and x<215: fill_rect(x,203,2,10,'white') x=x+s fill_rect(x,203,2,10,'black') if keydown(KEY_UP) and y>5: fill_rect(230,y,10,2,'white') y=y-s fill_rect(230,y,10,2,'black') if keydown(KEY_DOWN) and y<185: fill_rect(230,y,10,2,'white') y=y+s fill_rect(230,y,10,2,'black') if keydown(KEY_ONE): c='blue' if keydown(KEY_TWO): c='red' if keydown(KEY_THREE): c='green' if keydown(KEY_FOUR): c='yellow' if keydown(KEY_FIVE): c='brown' if keydown(KEY_SIX): c='black' if keydown(KEY_SEVEN): c='white' if keydown(KEY_EIGHT): c='pink' if keydown(KEY_NINE): c='orange' if keydown(KEY_DIVISION): c='purple' if keydown(KEY_MULTIPLICATION): c='gray' if keydown(KEY_ZERO): fill_rect(0,0,230,200,'white') c='white'