Starting from:

$25

Lab 0 Sort


Lab 0 Sort

You are tasked with updating the function order(data) in student_code.py. This code takes the array
“data” passed into the function, and re-orders the data in ascending order (smallest numbers at lowest
index, highest at highest index). For example, it changes this [-1, 3, 2, 8, 9, 11, 100, 4] to this: [-1, 2, 3, 4,
8, 9, 11, 100]. When you submit your code on canvas, you should only submit your student_code.py.
The goal of this lab is two fold:
1: It is designed to familiarize everybody with environment and submission process for the class.
2: It is designed to make sure you are comfortable with using python -- If you struggle with Lab0, you
don’t have the python coding experience needed for 348, and will struggle with the remainder of the
labs, which only get more difficult. If this is the case I would recommend dropping the class.
Some considerations for this lab:
-Data array can have any size = 0
-Data array will only have integers, ranging from -1000 to +1000 (inclusive)
-You cannot use the python built-in list function sort() or sorted(). Code that uses this will receive a 0.
-You cannot include any additional modules
-Make sure you use python3, and that your code runs correctly on the Northwestern servers described
in class.
Execute and test by running: python3 main.py
• This tests your code against some test cases, but passing all test cases does not guarantee you
will pass all grading cases (they will be different). Try your own test cases too! Think about corner
cases.

More products