Question: coding in jupyter notebook Question 1 (20 pts) Create a list called numbers containing the values from 1 through 15, then use slices to perform
Question 1 (20 pts) Create a list called numbers containing the values from 1 through 15, then use slices to perform the following operations consecutively: a. Select number's even integers. b. Replace the elements at indices 5 through 9 with Os, then show the resulting list c. Keep only the first five elements, then show the resulting list. d. Delete all the remaining elements by assigning to a slice. Show the resulting list. Question 2 (10 pts) Create a list called numbers containing the values from 1 through 15, then use the del statement to perform the following operations consecutively: a. Delete a slice containing the first four elements, then show the resulting list. b. Starting with the first element, use a slice to delete every other element of the list, then show the resulting list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
