Compsci 101, Fall 2012, Lab 7
By entering your name/net-id below you indicate you are present for Lab 7
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: _____________
Top 1000/.csv
- What do you see?
- What are the differences when you say to show 200 words instead of
50?
- Purpose of parameters
delimeter
and
quotechar
:
- Purpose of
d[artist] = []
?
- Explain the purpose both in terms of what the list comprehension
below does and in how it fits with the other lines/list
comprehensions in determining the top 30 artists.
tosort = [(len(t[1]),t[0]) for t in info]
What's the purpose of the slice info[-30:]
?
What are the top 5 artists?
SpeedDial
- Answer for first paper-pencil problem:
- Total number of key-presses with no speed-dial:
total = sum([ ])
- Number of key-presses saved
when a six-digit number is dialed 12 times and the number is put in a
speed-dial slot? Why?
- List with
save[i]
being key-presses saved:
saved =
- Which numbers go in speed-dial slots?
- Creating code for
saved_presses
:
saved_presses =
- Last steps to solve APT:
MemberCheck
- What are the contents (words) of
cheat1
?
- Three (two more) list variables
- Based on previous variables:
return sorted( )
Customer Statistics
- Unique, sorted names on one line:
- Finished APT on paper.