import random import simplegui print "Hello" print random.randrange(0,4) yy = simplegui.load_image("http://storage.googleapis.com/codeskulptor-assets/cards_jfitz.png") def key_handlerdown(e): print e def key_handlerup(e): print e def mouse_handler(e): print e def draw_handler(canvas): canvas.draw_polygon([(0, 0), (400, 0), (400, 400), (0, 400)], 12, 'Gray', 'Gray') canvas.draw_text('Purple', [225, 100], 35, 'Purple') canvas.draw_line((0, 0), (500, 500), 10, 'Green') canvas.draw_circle([160, 300], 80, 8, 'Yellow', 'Orange') canvas.draw_image(yy, (36, 48), (72, 96), (36, 48), (72, 96), 0.5); canvas.draw_point((250, 146), 'Green') frame.set_mouseclick_handler(mouse_handler) frame = simplegui.create_frame('Testing', 500, 500) frame.set_canvas_background('Blue') frame.set_draw_handler(draw_handler) frame.set_keydown_handler(key_handlerdown) frame.set_keyup_handler(key_handlerup) frame.start()