Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this assignment, you'll be building a user interface around a text that the user finds inspirational. As a default text (and to practice your

For this assignment, you'll be building a user interface around a text that the user finds inspirational. As a default text (and to practice your code on), you can use this text version of the Bible (on second thought, a shorter text makes more sense to practice with -- try White Nights), but 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).

Here is the code I flashed in class (for sending emails and accessing websites -- note that you should put in your own ghost email and password).

MUST FOLLOW A GRADE GUIDELINES

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions

Question

Compose the six common types of social business messages.

Answered: 1 week ago

Question

Describe positive and neutral messages.

Answered: 1 week ago