Question: A-1. Create a list L1 containing numbers from 15 to 24 (24 exclusive), using LIST COMPREHENSION (do not use list function or usual FOR loop).

A-1. Create a list L1 containing numbers from 15 to 24 (24 exclusive), using LIST COMPREHENSION (do not use list function or usual FOR loop). Sort the list in ascending order. Create a new list L2 from L1 using LIST COMPREHENSION, where the elements of L1 and L2 are related as follows: (5 marks)

use python please and I need answers as text not photo so I can copy the code

A-1. Create a list L1 containing numbers from 15 to 24 (24

A-2

Let B = [61, 25, 36, 21, 58, 101, 254, 200] be a list. Apply the following function ( 2 ( 2))//50 on each element of B. Don't use FOR loop!

A-1. Create a list L1 containing numbers from 15 to 24 (24 exclusive), using LIST COMPREHENSION (do not use list function or usual FOR loop). Sort the list in ascending order. Create a new list L2 from L1 using LIST COMPREHENSION, where the elements of L1 and L2 are related as follows: L2=[] for i, e in enumerate (L1): if e%2==1: if e>i: L2. append (e+i) else: L2. append (ei) A-2. Let B=[61,25,36,21,58,101,254,200] be a list. Apply the following function (x2 (x2))//50 on each element of B. Don't use FOR loop! (4 marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!