Lists Warm Up#

Section Title: Lists Warm Up

Warm Up Question-1#

Create a list that includes an integer, a decimal number, a string, and a boolean value.

Warm Up Question-2#

Calculate the maximum value, minimum value, total sum, and the count of elements in the sequence of numbers 9,3,1,7,4,1,2,2,2,5,5,6,8,76,10,3,3,4 using a list.

Warm Up Question-3#

Use slicing to extract and display only the [5,4] portion of the list [3,8,2,5,4,8,9,9,2] by using both positive and negative indices.

Warm Up Question-4#

Use concatenation and repetition to generate the list [‘OH’, ‘FL’,’OH’, ‘FL’,’NJ’,’AZ’,’NJ’,’AZ’,’NJ’,’AZ’,’OH’, ‘FL’,’OH’, ‘FL’] from the lists [‘OH’, ‘FL’] and [‘NJ’,’AZ’].

Warm Up Question-5#

Add three additional elements to this list: [1,6,4].

Warm Up Question-6#

Count the occurrences of 3 in the list [4,2,8,3,3,9,3,3,5,6,7,8] and find the index of 9.

Warm Up Question-7#

Use the remove() method to delete 4 and the pop() method to delete 8 from the list [9,7,1,2,6,3,4,5,8,6].

Warm Up Question-8#

Calculate the sum of the even numbers in this list: [4,7,9,2,8,6]

Warm Up Question-9#

Create a new list containing words in text below that are 4 characters long, start with ‘z’, and end with ‘x’.

text = 'zabx a d f abcd yhst zmnx hsd lk zx ' 

Warm Up Question-10#

Use a list comprehension to construct a list consisting of the following numbers: 11,21,31,41,51,61,71