Oct 25, 2024
int, float, boola is initialized with the value 2.add_five is called with a as the argument.add_five, the parameter x is modified by adding 5, resulting in 7.a remains unchanged with the value 2.b is initialized with a single element 2 at index 0.change is called with b as the argument.change, the 0 index of the list x is modified to 10.b reflects this change, now containing 10 at index 0.add_five Function
a is initialized to 2.add_five(a) is called, modifying x to 7 inside the function.a is still 2.change Function
b is initialized as [2].change(b) is called, and x[0] is changed to 10 inside the function.b is [10].