# # a program that needs some work # from graphics import * # Build the window. def windowBuild(): # Create the window, with its all-important message. observe = GraphWin("Something worth remembering.", 300, 300) observe.setBackground("grey") direct = Text(Point (150,150), "Feeling tired lately? Click in the window.").draw(observe) # Create the message and a method to display it def ClickMess(): # Now create the all-importaant message. TaDa = "Wrap up what you're doing and let yourself get some sleep." TaDa.setFill("Cyan") # Check the mouse. clicky = win.GetMouse() clicky = Text(Point (200,200), TaDa).draw(observe) # Set up an exit for the program def ExitSleep(observe): direct.setText("Click anywhere in the window to exit, so you can get that sleep." observe.getMouse() def main(): windowBuild ClickMess ExitSleep main()