Compsci 101, Spring 2012, First Day

By entering your name/net-id below you indicate you are in class on January 12 to answer these questions and that you have answered them. Your name should not appear unless you are in class when answering these questions.
Name_________________   net-id _______   Name_________________   net-id _______


Name_________________   net-id _______   Name_________________   net-id _______

  1. In the session of Python done in the browser using the tool from skulpt.org what is the name of the function being run?

    1. test

    2. name

    3. def

  2. What's the best way to change the program shown so that it prints Hello Jello

    1. Change the call to test("Jello")

    2. Change the print statement to print "Hello Jello"

    3. replace the entire browser window with one statement print "Hello Jello"

  3. We'd like to change the function test so that it can print messages like "Hello pretty leopard", "Hello slimy toad", "Hello giant panda", i.e., so that a Hello greeting is printed an animal with an adjective so that both can be changed easily. What should be done?