Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python language Q1) [3 points] Given the following list: data ={3,6,9,12,15,18,21,24,27,30,33,36,37,42,45,48,51,54,57,40,43,54,47,72,75) Write a complete Python main function [mainO] in which you do the following. 1.

python language
image text in transcribed
Q1) [3 points] Given the following list: data ={3,6,9,12,15,18,21,24,27,30,33,36,37,42,45,48,51,54,57,40,43,54,47,72,75) Write a complete Python main function [mainO] in which you do the following. 1. Write a python statement that uses the range0 function to create the above data list. 2. Using list slicing create list1 which contains all the elements 3,12,21,.75 inclusive. [Hint: do not use loops: only slicing]. 3. Create list2 which is a copy of data. 4. Write statement(s) to remove from list2 all the elements that are found in list1. 5. Write statements to print the contents of data, list1 and list2, each in a separate print statement and properly labeled

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

Analyse the various techniques of training and learning.

Answered: 1 week ago