the task is below:https://pp.userapi.com/c850124/v85012411...C4WFRI.jpg
Ask user for a file with integer numbers (one number in each row). if the file does not exist, print a
message and finish.
Make an empty list. Read each row, delete the new line character (method strip()), convert it to
integer and append into the list. If the row does not contain an integer, skip it and continue with next.
Print the greatest number or a message for an empty list.
Write all the numbers and their difference from the greatest number to a new .csv file in the form
number;difference
Example
Input file:
Ask user for a file with integer numbers (one number in each row). if the file does not exist, print a
message and finish.
Make an empty list. Read each row, delete the new line character (method strip()), convert it to
integer and append into the list. If the row does not contain an integer, skip it and continue with next.
Print the greatest number or a message for an empty list.
Write all the numbers and their difference from the greatest number to a new .csv file in the form
number;difference
Example
Input file:
87 -18 -100 -55 15 -2 -88 90 11 21 73 -14 -38Output file:
87;3 -18;108 -100;190 -55;145 15;75 -2;92 -88;178 90;0 11;79 21;69 73;17 -14;104 -38;128will be very greatful for each answer!