Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the following list. Write a program to find total and mean of the list. In [1]: M list1 = [ i for i in
Consider the following list. Write a program to find total and mean of the list. In [1]: M list1 = [ i for i in range(1000) if i.3 ==0] In [ ]: M Q3: (2 points) Consider the following list. Write a program that stores the reverse of NumberL1st in a new list called NumberL1stRevised. Hint. Start with the emply list NumbertistRevised and fill it using the pop() function on Numbertist mulliple limes. In [2]: M Numbertist =[i for i in range(11)] In [3]: M NumberList Out [3]: [6,1,2,3,4,5,6,7,8,9,10] In [4]: M \# write your progran here: In [ ] : M Q4: (4 points) Consider the following list. In [6]: M ListofNurs =[[8],[1,2,3],[4,5,6,7],[8,9,10]] In [1]: M 4.1: Using list indices print the first, \# then the second and then the third child list. In [2]: M4.2: using list indices, print out elements 6,3,4,9 In [3]: M \#4.3. Replace the object 8 with 88 , In [4]:M H 4.4. Append the new child List [11,12,13,14] to the end of the nested list. In [9]: M fif.5. Using del functlon, rewove the second child list in the nested list In [10]: M M4.6. Using the remove() function, reitoce the elements 4 and 9 ran the nested List 1/23/23,12:23PM 523_HW2_Lists - Jupyter Notebook In [5]: M4.7. check whether the number 10 is in any of the child tist In [6]: M * 4.8. Using the ten() function, detervin how many child list are cantainted in the parent list localhost:8889inotebooks/Downloads/523_HW2_Lists.ipynb 2/2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started