Python Programming Assignment Help?
Would anyone be willing to help with my assignment?:
You are asked to read 1000 floats from a file, which is provided to you (floats.txt). The floats have to be read into a list.•Within your program you need to create a function insertion_sort(float_list) that takes as argument a list of floating point numbers and sorts it in ascending order (smallest first) using the Insertion Sort algorithm (see below).•After reading the floats from the file into a list, your main program should call the insertion_sort function, then it should: 1) print the now sorted list onto the screen; 2) write the sorted list onto a file (sorted_floats.txt).
- EddieJLv 78 months agoFavorite Answer
You should use stepwise refinement, which means that you shouldn't try to write your whole program at once.
You can start with this:
myList = [14.7, 29.3, 4.5, 97.5, 8.0]
def insertion_sort (float_list):
return float_list 
print (insertion_sort (myList))
- 8 months ago
So what part are you having problems with?
- Anonymous8 months ago