a tuple is declared as T= (2,5,6,9,8)
what will be the value of sum(T)?
Answers
Answered by
6
Given:
T = (2,5,6,9,8)
To find:
The value of sum(T).
Solution:
T = (2, 5,6,9,8)
sum(T) = 2 + 5 + 6 + 9 + 8 = 30
So, the value of sum(T) is 30 when T = (2,5,6,9,8).
More outputs:
1) T= (2,5,6,9,8)
print(T[1:3])
Output: (5, 6)
2) T= (2,5,6,9,8)
print(T[::2])
Output: (2, 6, 8)
3) T= (2,5,6,9,8)
print(T[:3])
Output: (2, 5, 6)
4) T= (2,5,6,9,8)
print(T[3:])
Output: (9, 8)
Similar questions