Question: Programming Assignment #2: Inspirational text (Due before class on Fri., Feb. 21) For this assignment, you'll be building a user interface around a text that

Programming Assignment #2: Inspirational text (Due before class on Fri., Feb. 21)

For this assignment, you'll be building a user interface around a text that the user finds inspirational. Your program should allow the user to input any textfile.

Here's the basics that your code needs to be able to do:

(For a B)

1. Greet the user in a friendly way, and ask them to input the name of a textfile. You should include a try/except to catch instances where the textfile can't be found, so that the user can try again.

2. Give the user a menu of the following options (your program should be able to do them all).

2a. Search for a specific word or phrase in the textfile and let the user know the number of times the word/phrase occurs.

2b. Search for a specific word or phrase and print a string of about 100 characters around the word or phrase to let the user see the context. Optional Bonus: Cycle through the places where the term occurs and let the user press a button to go to the next occurrence, or a different button to escape back to the menu.

2c. Do a search and replace. Let the reader know that you've completed the search and replace.

2d. Encode the text and save it as a new textfile. Let the reader know that the file has been created, and what the name of it is.

2e. At least one other feature of your choice.

2f Quit the program. (Be sure to give the user a friendly good-bye!)

(For an A)

In addition to everything above, the user should be able to request that an email be sent to them with either (a) a chunk of text including a specific keyword, or (b) a random chunk of text from the file (the user should have the choice; your program should have the capability to do either). Be sure to have them input their email! Your program will need to access your email, and will include your name and password, so I suggest that you set up a new email account just for this project (that way I won't see the password to your real email account).

MUST BE ABLE TO COPY AND PASTE INTO PYTHON AND IT RUN PERFECTLY

MUST FOLLOW A GUIDLEINES

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!