""" file: cat.py author: CS1510 description: display the contents of a file to the screen """ # prompt for the user to enter a file name fileName = input("cat: ") # open the file fileObject = open(fileName,"r") # Read the whole file fileString = fileObject.read() # Print each line print(fileString) # close the file fileObject.close()