Compsci 101, Fall 2012: Lab 10 Word Cloud
By entering your name/net-id below you indicate you are present for this lab
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: _____________
- What is the most frequently occuring word in romeo.txt and
how many times does it occur?
- What is the tenth most frequently occurring word in
romeo.txt and how many times does it occur?
- Write the code that fills in the dictionary in
count_words
.
- What additional schemes could you use for sanitizing words?
- Write your code to transform the list of tuples for sorting in
top_words
.
- Why is it a good idea to transform the list's tuples back to their original order before returning the list in
top_words
?
- Write an algorithm (or mathematical expression) to determine the font size from the word's count.