Code -
def add(a, b):
return a + 5 , b + 5
print(add(10,11))
Solution -
The add function takes two parameters, a and b, and returns a tuple where the first element is the sum of a + 5 and the second element is b + 5.
When you call add(10, 11), it will return a tuple where the first element is 10 + 5 (which is 15) and the second element is 11 + 5 (which is 16). Therefore, the output of print(add(10, 11)) will be: (15, 16)
0 Comments:
Post a Comment