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]

New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Patrick M. Carey
Chapter12: Working With Document Nodes And Style Sheets: Creating A Dynamic Document Outline
Section12.2: Visual Overview: Exploring Attribute Nodes
Problem 2QC
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
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning