Sorting problem
In computer science there is a recurring problem which is how to sort a list of numbers. In this assignment you get a flowchart of a possible solution and based on that you need to write the equivalent python script. This is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong order.
- Implement the algorithm described by the flowchart in Python!
- Improve your solution:
- Structure your code: separate some logic into functions.
- Modify your program so ask the user to give the list of numbers.
Submit your python script file.
(Please note that the second step (‘Improve your solution’) is the inherent part of the assignment, not an extra.)
Besides programming knowledge, this assignment improves your skills to conform to requirements.