Task 6: Tuple
1.Create a tuple containing the names of three fruits. Print the tuple and its type. 2.Given a tuple t = ("apple", "banana", "cherry"), access and print the second element. 3.Unpack the tuple t = (1, 2, 3) into variables a, b, and c, and print the variables. 4.Concatenate two tuples t1 = (1, 2) and t2 = (3, 4) and print the result. 5.Create a tuple t = ("repeat",) and repeat it three times. Print the resulting tuple. 6.Given a tuple t = (1, 2, 3, 2, 2, 4), count the number of times the number 2 appears. 7.Given a tuple t = ("a", "b", "c", "d"), find the index of the element "c". 8.Check if the element 5 is present in the tuple t = (1, 2, 3, 4) Find and print the length of the tuple t = ("one", "two", "three"). Slice the tuple t = (0, 1, 2, 3, 4, 5) to obtain a sub-tuple containing only the elements from index 2 to 4. Create a nested tuple representing a 2D point (x, y) = ((1, 2), (3, 4)). Access and print the second coordinate of the second point. Try to change the value of the first element in the tuple t = (1, 2, 3) and observe what happens. Convert a list l = [1, 2, 3] to a tuple and print the result. Then convert a tuple t = (4, 5, 6) to a list and print the result. Create a tuple with a single item 5 and verify its type is a tuple. Iterate over the tuple t = ("ParottaSalna", "is", "good") and print each element. Convert the string "hello" into a tuple of characters. Convert a dictionary d = {"one": 1, "two": 2} into a tuple of its items. Write a function that takes a tuple of numbers and returns the sum of the numbers. Use tuples as keys in a dictionary to represent points on a grid. For example, grid = {(0, 0): "origin", (1, 2): "point A"}.

1.Create a tuple containing the names of three fruits. Print the tuple and its type.
2.Given a tuple t = ("apple", "banana", "cherry"), access and print the second element.
3.Unpack the tuple t = (1, 2, 3) into variables a, b, and c, and print the variables.
4.Concatenate two tuples t1 = (1, 2) and t2 = (3, 4) and print the result.
5.Create a tuple t = ("repeat",) and repeat it three times. Print the resulting tuple.
6.Given a tuple t = (1, 2, 3, 2, 2, 4), count the number of times the number 2 appears.
7.Given a tuple t = ("a", "b", "c", "d"), find the index of the element "c".
8.Check if the element 5 is present in the tuple t = (1, 2, 3, 4)
Find and print the length of the tuple t = ("one", "two", "three").
Slice the tuple t = (0, 1, 2, 3, 4, 5) to obtain a sub-tuple containing only the elements from index 2 to 4.
Create a nested tuple representing a 2D point (x, y) = ((1, 2), (3, 4)). Access and print the second coordinate of the second point.
Try to change the value of the first element in the tuple t = (1, 2, 3) and observe what happens.
Convert a list l = [1, 2, 3] to a tuple and print the result. Then convert a tuple t = (4, 5, 6) to a list and print the result.
Create a tuple with a single item 5 and verify its type is a tuple.
Iterate over the tuple t = ("ParottaSalna", "is", "good") and print each element.
Convert the string "hello" into a tuple of characters.
Convert a dictionary d = {"one": 1, "two": 2} into a tuple of its items.
Write a function that takes a tuple of numbers and returns the sum of the numbers.
Use tuples as keys in a dictionary to represent points on a grid. For example, grid = {(0, 0): "origin", (1, 2): "point A"}.