Question: ****Using Python Only It is common to enhance programs that have already been written to take advantage of new technologies and our better understanding of

****Using Python Only

It is common to enhance programs that have already been written to take advantage of new technologies and our better understanding of the problem. Here, we're going to revisit and enhance the form_letter_reply.py from Module 1. Follow these steps:

  • Copy the contents of the form_letter_reply.py into form_letter_reply_v2.py.
  • Update the program so the content of the letter is created in a function if that is not already the case. That function should take in a "name" parameter of which the contents will be replaced after the Hello on the first line.
  • Extend the program to prompt for a file with a list of names in it, one per line.
  • For each name, generate the response letter as was done in the first version, with the name read in from the file sent to the function.
  • Write all responses to a file named "output_responses.txt". If the program is run multiple times, this file should be overwritten.

An example interaction is a follows:

Enter the file name containing customers: submitted_issues.txt Finished processing the replies.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

list of names that must be included in the form_letter_reply_v2.py.

Johny Cage Billy Anthony Andy Good Mike Olbert Duke Strong Eli Web Jack Brown Cassie Lindsey Rudy Hall Jena Kreese

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

******the old one**********for the second one the names have to be changed

Here is how the old reply looked like:

****Using Python Only It is common to enhance programs that have already

'bot' or robot. Create a program that will create the following output utilizing functions to decompose steps. It is recommended that you use a 'main' function that holds the steps of you program. Hello Jim Bowman, We have received your support email and will contact you shortly, in the order received. Please allow 2 hours for our response. We appreciate your patience. Best Regards, The Support Dept. %%%%% Hello Patti Weimbacher, We have received your support email and will contact you shortly, in the order received. Please allow 2 hours for our response. We appreciate your patience. Best Regards, The Support Dept. ***** Hello Lakshmi Vermikata, We have received your support email and will contact you shortly, in the order received. Please allow 2 hours for our response. We appreciate your patience. Best Regards, The Support Dept

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!