Question: The following code segment fname raw_input('Enter the file name: ) try: fhand open (fname) except: print 'File cannot be opened:', fname exit() is used to

 The following code segment fname raw_input('Enter the file name: ") try:fhand open (fname) except: print 'File cannot be opened:', fname exit() isused to O Insure that the inputted file name has been successfully

The following code segment fname raw_input('Enter the file name: ") try: fhand open (fname) except: print 'File cannot be opened:', fname exit() is used to O Insure that the inputted file name has been successfully opened O Gives the programmer access to the file contents through the file handle fhand O Leaves the program if the inputted file cannot be opened All of the above None of the above

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!