# File: ChapterGraphics/fillWord.py # Ask user for a name # Fill the canvas with the anme (rows and columns) from graphics import * def main(): winW, winH = 300,300 win = GraphWin( "Write on a canvas" , 500,500 ) word = "alan" xstart, ystart = 40, 50 stepX, stepY = 60, 40 n = 3 # how many columns m = 5 # how many rows for i in range(n): for j in range(m): msg = Text( Point(xstart + i * stepX, ystart + j * stepY ),word) msg.draw(win) main()