Name: ______________ Net id: _____________ || Name: ______________ Net id: _____________ Name: ______________ Net id: _____________ || Name: ______________ Net id: _____________
do_mad_lib what is the purpose of this
code in the function (you can remove it to see what it does)?
re.sub does not change its argument contents,
i.e., that the function re.sub
returns a value but doesn't have a side-effect on its parameter?
get_word_from_user for
each element in all_tags?
subs =
read_tagstore function loops over each line
that it reads, what is the purpose of calling line.strip()?
key. What code did you write to add values to an
already existing dictionary value (a list) corresponding to key?
all_tags, but generates them automatically
by calling get_word_from_computer?
do_mad_lib have when you've
finished this section?
print_out
curr_len if the line was
too long? Why did you do this?
curr_len
did you make when printing the word followed by a space?
print word, sufficient to print a
word, followed by a space, and remain on the same line for
the next print?
What is the category of the tag-a-story, Mad Lib you created?