Question: 2 . Write a python program that creates the tuple tt = ( 5 5 , 7 7 , 5 4 , 6 , 7

2. Write a python program that creates the tuple tt =(55,77,54,6,76,101,1,2,8679,123,99) and then
Access the number 2 and save it under answer_4. Display the answer_4 on the console.
Add all the numbers inside the tt. Hint: From the NumPy library, you can use np.sum and np.array.
Find the average of all the numbers in tt and display the result.
Create a new tuple with the first 5 elements of tt and display the result.
Create a new tuple with the last 5 elements of tt and display the result.

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