Question: needs to be basic python Data - Notepad File Edit Format 15 S NU 3 10 Your program should also handle the following errors: ERROR



Data - Notepad File Edit Format 15 S NU 3 10 Your program should also handle the following errors: ERROR OUTPUT If there is no file called Data.txt No file found If the first line of the list is not an int Data file not compatible If there are not enough lines of data because the first int in the file is wrong Just make a list with the existing data. Output a message before the list prints saying that there was a mismatch between expected and actual data If one of the lines of data is not an int Skip adding that line to the list - Output a message before the list prints saying 'some data not valid If a math error occurs This function produces an ERROR Lab 2B - trylexcept 100 pts Directions: Write a program that will read in a list of Integers from a file called Data.txt which is supposed to contain the following information in the following format Integer - line 1 next integer next integer next integer next integer next integer Integer - line 1 is the number of remaining lines in each file. next integer is supposed to contain just an integer but might have errors on certain lines Write the code that will place all the next integer values in a list. Write a function that takes the square root of the sum of all the values except the last one and returns that answer divided by 10 rounded off 1 decimal place. WNU File Edit Format View Help 5 2 The numbers 2, 3, 7, 4, and 10 would be placed in a list. The function would add the 2, 3, 7, and 4. It would return the square root of that sum divided by 10. 7 4 10 Testing your code requires the following output: printing each element of your list vertically printing a call to your function using that list using the following format: 'The function produces
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
