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]

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter3: Performing Calculations With Formulas And Functions
Section: Chapter Questions
Problem 3.9CP
icon
Related questions
Question

Must show it in Python:

Please show step by step with comments.

Please show it in simplest form.

Input and Output must match with the Question

Please go through the Question very carefully.

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]
Transcribed Image Text: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]
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr