Question: This is for Python, I am struggling on the questions below. Q3: Consider the following list. Write a program that stores the reverse of NumberList

This is for Python, I am struggling on the questions below.

Q3:

Consider the following list. Write a program that stores the reverse of NumberList in a new list called NumberListRevised.

Hint. Start with the empty list NumberListRevised and fill it using the pop() function on NumberList multiple times.

In [ ]:NumberList = [i for i in range(11)]

In [ ]: write your program here:

This is for Python, I am struggling on the questions below. Q3:

Q4:

Consider the following list.

In [11]: ListofNums = [[0],[1,2,3],[4,5,6,7],[8,9,10]]

In [4]: #4.1: Using list indices print the first, then the second and then the third child list.

In [5]: # 4.2: Using list indices, print out elements 0,3,4,9

In [7]: # 4.3. Replace the object 8 with 88.

In [8]: # 4.4. Append the new child list [11,12,13,14] to the end of the nested list.

In [9]: # 4.5. Using del function, remove the second child list in the nested list

In [10]: #4.6. Using the remove() function, remoce the elements 4 and 9 rom the nested list

In [ ]: #4.7. Usingh the in function, check whether the numnber 10 is in any of the child list

In [ ]: # 4.8. Using the len() function, determin how many child list are containted in the parent list

Consider the following list. Write a program that stores the reverse of

Q3: (2 points) Consider the following list. Write a program that stores the reverse of Numberlist in a new list called NumberlistRevised Hint. Start with the empty list NumberlistRevised and fill it using the pop() function on Numberlist multiple times. In [ ]: Numberlist = [i for i in range(11)] In [ ]: # write your program here: Q4: (4 points) Consider the following list. In [11]: Listofnums = [[@],[1,2,3],[4,5,6,7],[8,9,10]] In [4]: #4.1: Using list indices print the first, then the second and then the third child list. In [5] : # 4.2: Using List indices, print out elements 2,3,4,9 In [7]: # 4.3. Replace the object 8 with 88. In [8]: # 4.4. Append the new child List (11, 12, 13, 14] to the end of the nested list. In [9]: N# 4.5. Using del function, remove the second child List in the nested List In [10] : #4.6. Using the remove() function, remoce the elements 4 and 9 rom the nested List In [ ]: #4.7. Usingh the in function, check whether the number 10 is in any of the child List In [ ]: # 4.8. Using the len() function, determin how many child list are containted in the parent List

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!