Question: WRTE THS CODE WTH PYTHON USE ONLY PYTHON PYTHON PLEASE! (25 pts) Please check the source code generate_random_number_file.py given. You can generate a file with
WRTE THS CODE WTH PYTHON USE ONLY PYTHON PYTHON PLEASE!

(25 pts) Please check the source code generate_random_number_file.py given. You can generate a file with a randomly generated integer on each line. Please use this file to create six files for n=10, n=100, n=1000, n=10000, n=100000, n=1000000. Implement the sorting algorihms for insertion sort, bubble sort, selection sort and, merge sort. The source code for these algorithms are given available on lecture slides. Sort the content of each file using these solutions, time the performance and create a table showing value of n, sorting algorithm and time it takes. import random n = 1000000 # Modify this for n = 10, 100, 1000, 10000, 100000, 1000000 f = open("numbers.dat", "W") for i in range(n): a = random.randint(1, 10000000) f.write(str(a) + " ") f.close()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
