Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use following data structures. list_one = [24,4,654,23,345,654,3,1,45,3,23,23,33] list_two = [23-4,23,234.34,63,48.9,21,45,98.4,78.4] list_three = [us, we,in,you,city, zebra,lion,btech,minister, so,bharat] tuple_one = (23,37,98,89.5,38.33,88,12.34,23.44) tuple_two = (7326,32,'324',45.24, 2AM',(34,32,30,28),(55, 'Good Morning!','India'])

image text in transcribed

Use following data structures. list_one = [24,4,654,23,345,654,3,1,45,3,23,23,33] list_two = [23-4,23,234.34,63,48.9,21,45,98.4,78.4] list_three = ["us", "we","in","you","city", "zebra","lion","btech","minister", "so","bharat"] tuple_one = (23,37,98,89.5,38.33,88,12.34,23.44) tuple_two = (7326,32,'324',45.24, 2AM',(34,32,30,28),(55, 'Good Morning!','India']) tuple_three = (67,89,8,33,48,34,236,34,45,65,6,33,24,43,24,54,65,53,6,6,6,3,43,24,2,53,2,53,4,5,34,5) Q. 1 Use list_one and find the difference between the sum of values of even index and odd_index. Q. 2 Use list_one, create list_four by adding first and last element then second and second last then third and third last and so on like. Print list_four. list_one addition list_one list_four Q. 3 Write code to find the deviation of list_four elements from the average of list_four elements. (use list_four created in Q.2) and print. Q.4 Use list_two and make slicing where starting index 6, stop index 2 and step of -1 and append this slicing to list_one. Then find the length, sum, average, minimum, maximum of list_one and Print. (Do not use predefined function like min (), max(), len() and sum()) Q.5 Use list_three and print the strings where sum of letter's position are greater than 30. "a" has position 1 and "z" has position 26". Example string "us" has two letters 'u' has position 21 and 's' has position 19, so sum is 40 and greater than 30 and we are going to print it Q.6 Use tuple_one and find the sum of values after decimal and print

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 Processing Fundamentals Design And Implementation

Authors: David M. Kroenke

5th Edition

B000CSIH5A, 978-0023668814

Students also viewed these Databases questions