Compsci 101, Fall 2012, Lab 5
By entering your name/net-id below you indicate you are present for Lab 5
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: _____________
AnagramFree
- Use sets:
foods = ["bagel", "bagel", "cheese", "bagel", "hummus" "onion", "bagel", "onion"]
diff =
- What's the value of the list comprehension below (write it out):
[sorted(w) for w in ['cow', 'dog', 'ant', 'bat']]
- Sorted strings:
words = ["eat", "aet", "tea", "bat", "tab", "ode", "doe"]
unique =
- One line solution to APT:
def getMaximumSubset(words):
return len( )
ChocolateBar
-
Write
str_unique.
- How to solve ChocolateBar, what will be hard?
Hangman
- Function header for
process_letter with types noted:
- Code to implement
process_letter (body of the function)
- Value of
knowledge?
- Value of
knowledge after the code executes?
- Display list-of-lists with underscores (or guessed letters)