# Marty Stepp, CSE 142, Autumn 2007 # This program prints an ASCII text figure that # looks like a mirror. # This version uses a class constant to make the figure resizable. SIZE = 4 # constant to change the figure size def mirror(): """Prints the bottom half of the rounded mirror.""" for line in range(1,SIZE+1) + range(SIZE,0,-1): print "|" + " "*(-2 * line + (2 * SIZE)) + "<>" + "."*(4 * line - 4) + "<>" + " "*(-2 * line + (2 * SIZE)) + "|" def line(): """Prints the #==# line at the top and bottom of the mirror.""" print "#" + "="*(4 * SIZE) + "#" line() mirror() line()