# File: ChapterGraphics/fillWord2.py # Ask user for a name # Fill the canvas with the name (rows and columns) from graphics import * def main(): word = input("enter a name?") print("you entered" , word) drawword(word) def drawword(word): winW, winH = 300,300 win = GraphWin( "Write on a canvas" , 500,500 ) xstart, ystart = 40, 50 #where you start stepX, stepY = 60, 40 # step for X and Y 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()