Question: Write a program that prompts a user for any file name. Then prompt the user for a line number and display that line of the
Write a program that prompts a user for any file name. Then prompt the user for a line number and display that line of the file to the user. Use exception-handling code (instead of importing os and using os.path.isfile(file_name)) to ensure the file exists; reprompt if it doesn't. Also use exception-handling code when converting the user's line inputs to integers; reprompt if the input is not an integer.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
