Question: Using Python. Write a program that reads a file of numbers of type int and writes all the numbers to another file, but without any

Using Python.
 Using Python. Write a program that reads a file of numbers
of type int and writes all the numbers to another file, but

Write a program that reads a file of numbers of type int and writes all the numbers to another file, but without any duplicate numbers. Assume that the numbers in the input file are already ordered from smallest to largest. After the program is run, the new file will contain all the numbers in the original file, but no number will appear more than once in the file. The numbers in the output file should also be sorted from smallest to largest. Your program should obtain both file names from the user. The input files is a text-file with one number per line. In addition, everything written to the output file should also be written to the screen/monitor so that the user is aware of where the program is in processing. Make sure to use exception handling around all user input and file processing. Case 1: Use the input file, InputNumbers.txt Write your output to file, OutputNumbers.txt Case 2: Use the input file, Input2.txta Write your output to file, Output2.txt Your prompts should be: Input filename request: Please enter the name of your input file: Output filename request: Please enter the name of your output file: First line of output: Unique Numbers in file InputNumbers.txt are: Last line of output (after unique numbers are printed out): There were 97 unique integers in the file InputNumbers.txt that contained a total of 2216 integers

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!