Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello , please need help for this Python assignment. Thanks for your help CIST 2742 - Python Programming e. Break your application into functions (modules)

Hello , please need help for this Python assignment. Thanks for your help

image text in transcribed
CIST 2742 - Python Programming e. Break your application into functions (modules) each function having a unique responsibility. Use stubs as you develop the program. Lab #6 - (40 Points) - More File Processing f. Perform both positive and negative tests. g. Submit both the well-commented code you wrote, the two files you Write a program (readTextFile.py) that asks the user to choose whether to produced, and the test result you got. display all the records in the input file (cobbLibraryList.txt), or display the records one at a time, or search the file for specific records based on user Here is a snippet of the kind of data found in the file: entry. Note that each record in the file has three lines consisting of the name of the library, the address of the library, and the telephone number. The PIN-A Switzer Library input file will be provided for downloading and using. 266 Roswell Street, Marietta, GA 30060 (770) 528-2320 Open the input file on Notepad and be familiar with the data before you East Cobb Library attempt to write the program. 4880 Lower Roswell Road, Marietta, GA 30068 (770) 509-2730 If a searched text is not found in the file, you will need to display the message, record not found. Gritters Library 880 Shaw Park Road, Marietta, GA 30066 If the searched record is found, you will need to display the name, address, (770) 528-2524 and telephone number of the record found in three separate lines as shown below. No other records should be displayed. Kemp Memorial Library 4029 Due West Road, Marietta GA 30064 Name: (770) 528-2527 Address: Lewis A. Ray Library Telephone number: 4500 Oakdale Road, Smyrna, GA 30080 (770) 801-5335 Process records until the user indicates he is done. Mountain View Regional Library a. Add validation logic for each input field. Put the code in a try catch 3320 Sandy Plains Road, Marietta, GA 30066 block. Research the exception each input field can potentially throw, e.g (770) 509-2725 value error. None of the fields should be spaces. Numeric fields should accept only numeric data. b. The decision the program makes must be correct. For example, it should not display no record found while there is a record matching the search criteria. If more than one record matching the criteria is found, both records must be displayed c. Create a new output file (cobbLibraryList.txt) containing only the library names and the telephone numbers, no address should be included in the file d. Use appropriate column headings when displaying the library data. Make sure the column headings line-up nicely

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Students also viewed these Programming questions