Please send questions to
st10@humboldt.edu .
# contract: spam3: void -> void
# purpose: ask the user how many times to
# print I LIKE SPAM to the screen
# and then do so
# example: if I call spam3() and enter 3 when prompted,
# then the following will be printed to the screen:
# I LIKE SPAM!
# I LIKE SPAM!
# I LIKE SPAM!
# That's all, folks!"
def spam3():
# initialize my counter
count = 0
user_number = int( raw_input("How much Spam would you like? ") )
# print message that many times
while (count < user_number):
print "I LIKE SPAM!"
# increment the counter
count = count + 1
print "That's all, folks!"