Write a program that accepts a filename as a command-line parameter. The program
will search the given file for each letter in the alphabet and print statistics on the
number of occurrences.

I was wondering if i could have some help with this as i dont understand how to do it, and it is important to get it completed any help will be much appreciated?


Tis a long time since I've coded any Python, so you may find the help of others more useful. But to get you started in the right direction, you'll likely need to...

Use sys.argv to obtain the command line parameters, as documented here:

Read in the file, see section "7.2 Reading and Writing Files":

Loop through each character, see "4.2. for Statements":

Use a dictionary object to store the frequency of characters, see "5.8. Mapping Types - dict":

The rest you should be able to figure out, assuming you're already familiar with "hello world" ;-)

There's some reading to do here of the documentation, but not too much. Programming is often like that. Hope this gets you started.

commented: correct kind of advice +12

You'll want to read up on the "raw input" function in python. You can use it to enter anything (integers, strings, floats) directly from the command line to the program.