CompSci 6, Fall 2011, Lab 2
By entering your name/net-id below you indicate you are in lab on September
8, 9, or 12 to answer these questions and that you were part of
the process that resulted in answers being turned in.
Name: ______________ Net id: _____________ || Name: ______________ Net id: _____________
Name: ______________ Net id: _____________ || Name: ______________ Net id: _____________
Farmer in the Dell
- Briefly describe the differences between the first three verses of the song?
- How could parameters be used to capture those differences (i.e., what value(s) might
X
and Y
repreent when calling verse(X)
and verse(Y)
to generate the first and second verse, respectively)
?
Here We Go 'Round the Mulberry Bush
- Suppose you misspelled the word mend everywhere in your program to generate this song. How many times would that misspelling appear in the lyrics
? And how many places would you have to change it in your program?
- In class, we have seen that functions
return
values. In this lab, the functions just print
strings. What is the difference between the Python function print
and the Python operator return
?