Ethan H.

asked • 04/30/21

Lab 5 Python Lists

include header information in your program and just submit the program.

Create a program that writes to a file.

The program must take user inputs of First Name, Last Name, Street address, City, State and ZipCode.

If the State a user enters is: PA ,NJ, DE, MN, NH use the zipcode list to replace the ZipCode entered when writing to your file.

The state and zipcode lists have five elements that are matched by index location.

The output file should contain five rows of name and address information and be formatted as below. Note the "|" character is the separator between values.

LastName|FirstName|Street Address|City|State|ZipCode 

Use the below lists in your program:

state = ["PA","NJ", "DE","MN","NH"]
zipcode = ["19063","18076","19067","24298","13890"]


1 Expert Answer

By:

Nicole A. answered • 06/02/21

Tutor
New to Wyzant

Experienced Python and Javascript tutor

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.