
Respuesta :
In Python, tuples are indeed a data structure that also stores an ordered sequence of unchanging values, and following are the Python program to the given question:
Program Explanation:
- Defining a method "add_tuples" that takes three variables "firstTuple, secondTuple, thirdTuple" into the parameter.
- After accepting the parameter value a return keyword is used that adds a single tuple with two values and returns its value into the form of (x,y).
- Outside the method, two print method is declared that calls the above method by passing value into its parameters.
Program:
def add_tuples(firstTuple, secondTuple, thirdTuple):#defining a method add_tuples that takes three variable in parameters
return firstTuple[0]+secondTuple[0]+thirdTuple[0],firstTuple[1]+secondTuple[1]+thirdTuple[1] #using return keyword to add value
print(add_tuples((1,4), (8,3), (14,0)))#defining print method that calls add_tuples method takes value in parameters
print(add_tuples((3,2), (11,1), (-2,6)))#defining print method that calls add_tuples method takes value in parameters
Output:
Please find the attached file.
Learn more:
brainly.com/question/17079721
