Generating Tallies


We are going to create a script which displays tally or survey results in tabular or graphical form. The first thing we need is a text file with information stored like this: Football 13 Baseball 23 Basketball 31 Golf 12 Tennis 11 Go ahead and populate it as you see fit (you can even change the topic if you'd like). Enter five to ten items and a number for each (representing votes for favorite sport or whatever).
Presenting Output

One form of output we could present to represent this information looks like this:

SPORT TALLY Football xxxxxxxxxxxxx (13) Baseball xxxxxxxxxxxxxxxxxxxxxxx (23) Basketball xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (31) Golf xxxxxxxxxxxx (12) Tennis xxxxxxxxxx (11)
ASSIGNMENT:

Your job is to write scripts which opens the source file and produces a file with content formatted as shown.