Tuple Task

Programming Questions

1. Write a program given access value 20 from the tuple tuple1 = (“Orange”, [10, 20, 30], (5, 15, 25))

2. Write a program to create a tuple with a single item 50

3. Write a program to swap two tuples in Python

4. Write a program to create a tuple

5. Write a  program to get the 4th element and 4th element from the last of a  tuple.

6. Write a program modify the tuple  tuple1 = (11, [22, 33], 44, 55)

7. Write a program Copy specific elements from one tuple to a new tuple

8. Write a program to create a tuple and update the value.

9. Write a program on how to concatenation tuple 

10. Write a program packing and unpacking 

 

Theory Questions

1. What is a tuple?

2. What is packing and unpacking

3. What is a tuple method

4. What are the two methods available for a tuple

5. How to find the number of occurrences of an element in a tuple?

6. How to add an element to a tuple?

7. What are difference list and tuple

8. How to convert a list into a tuple?

9. How to create tuple

10. How to sort element of a tuple