Write a Python program that performs the following operations on a tuple:

ICSE Class 10 Robotics & AI PYQ · 2025 Specimen · Section B

7(iii)Written · 2025 · Section B · 2025 Specimen

Write a Python program that performs the following operations on a tuple:

Show SolutionHide Solution↓
numbers_tuple = (5, 10, 15, 20, 25)
element = numbers_tuple[2]
print("Element at index 2:", element)
numbers_list = list(numbers_tuple)
numbers_list.append(30)
final_tuple = tuple(numbers_list)
print("Final tuple:", final_tuple)
Element at index 2: 15
Final tuple: (5, 10, 15, 20, 25, 30)
← Previous questionNext question →

Browse the free Robotics & AI sample bank