Assignment – 16

$ 24.99
Category:

Description

Tuple
1. Write a python script to store multiple items in a single variable ( Items are “Java” ,“Python”, “SQL”, “C” ) using tuple
2. Write a python program to store only one item using tuple.
3. Write a python program to reverse the tuple.
4. Write a python program to Swap two tuples in Python.
5. Write a python program to check if all items in the tuple are the same.
6. Write a python program to divide the tuple into four variables.
tuple1=(100, 200, 300, 400)
7. Write a python program to copy elements 4 and 5 from the following tuple into a new tuple. tuple1=(1,2,3,4,5,6)
8. Write a python program to Sort a tuple of tuples by the second item. tuple1 = ((‘a’, 21),(‘b’, 37),(‘c’, 11), (‘d’,29))
9. Write a python program to print the value 20 from given nested tuple tuple1 = (“Python”, [10, 20, 30], (2, 4, 16))
10. Write a python program to change the first item (22) of a list within the following tuple to 222.
tuple1 = (11, [22, 33], 44, 55)

Reviews

There are no reviews yet.

Be the first to review “Assignment – 16”

Your email address will not be published. Required fields are marked *