Compsci 101, Fall 2012, First Day
By entering your name/net-id below you indicate you are in class on
August 27 to answer these questions and that you have answered
them. Your name should not appear unless you are in class
and an active participant in
answering
these questions.
Name_________________ net-id _______ Name_________________ net-id _______
Name_________________ net-id _______ Name_________________ net-id _______
- In the session of Python done in the browser
using the tool from skulpt.org what
is the name of the function being run?
-
test
-
name
-
def
- What's the best way to change the program shown so that
it prints
Hello Jello
- Change the call to
test("Jello")
- Change the print statement to
print "Hello Jello"
- replace the entire browser window with one statement
print
"Hello Jello"
- 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
for an animal with an adjective so that both can be changed easily.
Which of the following (more than one can be correct) is a good choice
for the function header.
-
test(adj,animal)
-
test(x,y)
-
test(adjectiveanimal)
-
test(animal,adjective)
- Use this Khan Academy introduction to Computer Science. Manipulate the variable
eyeSize so that the circel that's the right eye-ball just
touches (is tangent to) the border of the yellow face
circle. Which of the following is closest to the value of the
variable when you're done?
- 39
- 49
- 59
- 69
- Manipulate the
fill function used to create the color
of the mouth so that the mouth is some shade of Duke blue. There are
three parameters to the fill function. What's the
value of the third parameter when you've made a Duke blue mouth
(pick the closest value).
- 90
- 130
- 170
- 210
- 250