Tuples Warm Up#
Warm Up Question-1#
Create a tuple containing the names of five different animals.
Warm Up Question-2#
Calculate the maximum value, minimum value, total sum, and the count of elements in the sequence of numbers (8,2,4,1,1,2,3,10,4,5,0,6,1,1) using a tuple.
Warm Up Question-3#
Use slicing to extract and display only the (‘e’, ‘h’, ‘y’, ‘a’) portion of the tuple (‘z’,’r’,’t’,’e’, ‘h’, ‘y’,’a’,’b’,’c’,’d’) by using both positive and negative indices.
Warm Up Question-4#
Use concatenation and repetition to generate the tuple (‘d’, ‘e’, ‘d’, ‘e’, ‘a’, ‘b’, ‘c’,’a’, ‘b’, ‘c’,’a’, ‘b’, ‘c’,’a’, ‘b’, ‘c’, ‘d’, ‘e’) from the tuples (‘a’, ‘b’, ‘c’) and (‘d’, ‘e’).
Warm Up Question-5#
Count the occurrences of 3 in the tuple (8,8,8,8,3,3,7,7,7,4,3,3,3,5) and find the index of 4.
Warm Up Question-6#
Use a for loop to print the second character of each name in the tuple (‘Taylor’, ‘Michael’, ‘Jenny’, ‘Daniel’, ‘George’).