Tuples
1. Write a program to create a new tuple with only the even elements
from the given tuple and also find its sum.
2. Write a program to count the number of digits, strings in a given
tuple.
3. Write a Python program to add an item in a tuple.
4. Write a Python program to convert a given tuple of positive
integers into an integer. Original tuple:
(1, 2, 3)
Convert the said tuple of positive integers into an integer:
123
Original tuple:
(10, 20, 40, 5, 70)
Convert the said tuple of positive integers into an integer:
102040570
5. Write a Python program to compute element-wise sum of
given tuples.
Original tuples:
(1, 2, 3, 4)
(3, 5, 2, 1)
(2, 2, 3, 1)
Element-wise sum of the said tuples:
(6, 9, 8, 6)