# File: ChapterGraphics/textCanvas.py # You have words in a list. # Write them on the canvas one under the other (vertically). # Assume the canvas is big enough. from graphics import * def main(): win = GraphWin( "Write on a canvas" , 300,300 ) L = ["Ada Lovelace", "Charles Babbage", "George Boole","Alan Turing"] xstart, ystart= 140, 50 step = 30 for i in range(len(L)): msg = Text( Point(xstart, ystart + i * step ),L[i]) msg.draw(win) main()