ex09SnowmenKangYooPark - # ex09DrawSnowManKangYooPark.py #...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
# ex09DrawSnowManKangYooPark.py # 11/05/08 # base on: ex09DrawSnowManWithTests.py, P. Conrad, CS5NM, 10/14/2008 # NOTE: When you run this file, it does NOT draw anything until you type: # draw() # at the Python Shell prompt. # stuff we need to import in order to use PyGame import pygame from pygame.locals import * from sys import exit # A function for running test cases # Note that \ character at the end of a line means that the line continues # on the next line def check_expect(test,check,expect): if (check == expect): print "Test " + test + " passed." else: print "Test " + test + " failed: expected " + str(expect) + \ " but I got " + str(check) # makeSnowManPoints make a tuple of points for a snowman # The snowman consists of three circles, stacked on top # of each other. The bottom circle has radius 2 units, # The middle circle has radius 1.5 units, and the top # circle has radius 1 unit. The entire height is 7 units. # consumes:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

ex09SnowmenKangYooPark - # ex09DrawSnowManKangYooPark.py #...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online