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 1: Python Collections
Lists and Tuples:
Create a list of at least 10 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 key-value pair indicating the
vehicle's .
Sets:
Create two sets of numbers, and , with at least 5 elements each, some of which should overlap
between the sets.
Demonstrate the following set operations:
Union
Intersection
Difference ('set_aset_b`)
Symmetric Difference
Part 2: Working with Libraries
Numpy:
Create a numpy array of shape (5,5) with numbers from 1 to 25.
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 5 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.
Part 1 : Python Collections Lists and Tuples:

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 Programming Questions!