Task 4 Suppose you have a sitting arrangement of the students who will give the final exam in a list. The list contains the last two digits of their student ID as given below. sitting_list = [10,30,20,70,11,15,22,16,58,100,12,56,70,80] Now you want to organize the sitting arrangement of the students in your own way. You decide to sort all the students in the even indices of the list in ascending order and all the students in the odd indices of the list in descending order. So, write a python program that organizes the list for you in this way. Sample Output (10, 100, 11, 80, 12, 70, 20, 56, 22, 30, 58, 16, 70, 15]

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Downloads/
CSE110 Lab Assignment 7 (Sortin x
English
O localhost:8888/notebooks/Downloads/CSE110%20Lab%20Assignment%207%20(Sorting%20and%20Searching).ipynb
Cjupyter CSE110 Lab Assignment 7 (Sorting and Searching) Last Checkpoint: 8 minutes ago (autosaved)
Logout
File
Edit
View
Insert
Cell
Kernel
Widgets
Help
Not Trusted
Python 3 O
• Run
с
Markdown
for i in range(len(my_list)):
for j in range(len(my_list)):
if my_list[i]>my_list[j]:
another_var=my_list[i]
my_list[i]=my_list[j]
my_list[j]=another_var
return my list
print('output: ' , bubble_sort([10,1,20,3,6,2,5,11,15,2,12,14,17,18,29]))
output: [29, 20, 18, 17, 15, 14, 12, 11, 10, 6, 5, 3, 2, 2, 1]
Task 4
Suppose you have a sitting arrangement of the students who will give the final exam in a list. The list contains the last two digits of their student ID as given
below.
sitting_list = [10,30,20,70,11,15,22,16,58,100,12,56,70,80]
Now you want to organize the sitting arrangement of the students in your own way. You decide to sort all the students in the even indices of the list in
ascending order and all the students in the odd indices of the list in descending order.
So, write a python program that organizes the list for you in this way.
Sample Output
[10, 100, 11, 80, 12, 70, 20, 56, 22, 30, 58, 16, 70, 15]
In [ ]: #todo
Task 5
Suppose a list contains marks earned in the courses CSE110, PHY111, and MAT110 of each student consecutively in a nested list form. Your task is to take a
Course name as innut from the user and sort the list based on the marks obtained in that course in order to finally print the names of the students in
1:16 PM
12/27/2021
Transcribed Image Text:Downloads/ CSE110 Lab Assignment 7 (Sortin x English O localhost:8888/notebooks/Downloads/CSE110%20Lab%20Assignment%207%20(Sorting%20and%20Searching).ipynb Cjupyter CSE110 Lab Assignment 7 (Sorting and Searching) Last Checkpoint: 8 minutes ago (autosaved) Logout File Edit View Insert Cell Kernel Widgets Help Not Trusted Python 3 O • Run с Markdown for i in range(len(my_list)): for j in range(len(my_list)): if my_list[i]>my_list[j]: another_var=my_list[i] my_list[i]=my_list[j] my_list[j]=another_var return my list print('output: ' , bubble_sort([10,1,20,3,6,2,5,11,15,2,12,14,17,18,29])) output: [29, 20, 18, 17, 15, 14, 12, 11, 10, 6, 5, 3, 2, 2, 1] Task 4 Suppose you have a sitting arrangement of the students who will give the final exam in a list. The list contains the last two digits of their student ID as given below. sitting_list = [10,30,20,70,11,15,22,16,58,100,12,56,70,80] Now you want to organize the sitting arrangement of the students in your own way. You decide to sort all the students in the even indices of the list in ascending order and all the students in the odd indices of the list in descending order. So, write a python program that organizes the list for you in this way. Sample Output [10, 100, 11, 80, 12, 70, 20, 56, 22, 30, 58, 16, 70, 15] In [ ]: #todo Task 5 Suppose a list contains marks earned in the courses CSE110, PHY111, and MAT110 of each student consecutively in a nested list form. Your task is to take a Course name as innut from the user and sort the list based on the marks obtained in that course in order to finally print the names of the students in 1:16 PM 12/27/2021
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY