Question: Part 1 : Python Collections Lists and Tuples: Create a list of at least 1 0 numbers. Then, perform the following operations: Append a new
Part : Python Collections
Lists and Tuples:
Create a list of at least numbers. Then, perform the following operations:
Append a new number to the list.
Remove a number from the list.
Sort the list in ascending order.
Convert this list into a tuple.
Write a function that takes this tuple as an argument and returns the sum and average of the numbers.
Dictionaries:
Create a dictionary to store information about a vehicle. The dictionary should include keys such as
and
Write a function that accepts this dictionary as an argument and adds a new keyvalue pair indicating the
vehicle's
Sets:
Create two sets of numbers, and with at least elements each, some of which should overlap
between the sets.
Demonstrate the following set operations:
Union
Intersection
Difference setasetb
Symmetric Difference
Part : Working with Libraries
Numpy:
Create a numpy array of shape with numbers from to
Calculate the transpose of the array.
Find the inverse of the array ensure the array is invertible
Pandas:
Create a pandas DataFrame with the following columns: and Department Populate it
with data for at least individuals.
Perform basic data analysis: find the average age and count the number of unique departments.
OpenCV
Read an image using OpenCV you may use any image of your choice
Convert the image to grayscale and save it with a new name.
Display the original and grayscale images side by side using
Submission Guidelines
Your script or notebook should be clearly commented on to explain your code and the outputs of each
operation.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
