Hello Ruben,
You might already know this, but the Python documentation will get you
pretty far: http://www.python.org/doc/
Here are some things to lookup that may help you solve the problems.
On 10/16/2013 08:49 PM, Pinedo, Ruben A wrote:
I was given this code and I need to modify it so that it will:
#1. Error handling for the files to ensure reading only .txt file
Look up exceptions.
Find out what the string method endswith() does.
#2. Print a range of top words... ex: print top 10-20 words
#3. Print only the words with > 3 characters
Look up how the built-in len() works.
#4. Modify the printing function to print top 1 or 2 or 3 ....
#5. How many unique words are there in the book of length 1, 2, 3 etc
Read up on different datatypes and choose the one, or combination types
that would solve this for you.
T
P.S. Tutors I hope this is posted to the list and the top. I always get
that wrong!
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor