Congratulations JDog, the first complete program on the list. And it works--well done! Richard-----Original Message----- From: Jeffrey Turner Sent: Sunday, May 18, 2014 1:21 PM To: pythonvis@xxxxxxxxxxxxx Subject: [pythonvis] My box drawing program, finally!
This is very simple and rudimentary, but I had fun writing it. JDog """ This program will draw a box according to width and height specs provided by the user""" print "I will now draw a box for you, with pretty plus signs for the corners, " print "dashes for the top and bottom, and bars for the sides." print width = input("How wide would you like the box to be?") print height = input("How high would you like the box to be?") corner = "+" dashes = width*"-" indent = " "*3 bar = "|" spaces = " "*width print top = bottom = indent+corner+dashes+cornerprint top sides = indent+bar+spaces+bar
count = height while count >= 1: print sides count = count-1 print bottom print print "OK, here is your", width, "by", height, "box." print "Thank you for doing business with the marvelous JDog."