Changes

Jump to: navigation, search

OPS435 Python Lab 5

40 bytes added, 08:13, 9 September 2017
LAB REVIEW
# What is the difference between opening a file for '''writing''' data as opposed to opening a file for '''appending''' data? What can be the consequence if you don't understand the difference between writing and appending data?
# Write a Python command to open the file '''customer-data.txt''' for writing data.
# Write a Python command to save the text: '''customer 1: Guido van Rossum''' (including a new-line character) to the opened file called '''customer-data.txt'''
# Briefly explain the process of using a loop to write a list as separate lines within an open file.
# What is the purpose of '''handling''' exception errors?
# Write a Python script to prompt a user for the name of the file to open. Use exception error handling to provide an error message that the specific file name (display that exact name) does not exist; otherwise, open the file for reading and display the entire contents of the file (line-by-line).
13,420
edits

Navigation menu