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 <em><u>single tuple with two values</u></em> 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
Answer: *use the last column for text with multiple lines.
*use an indent marker to indent the first line of a paragraph.
*use a table if text in multiple columns have multiple lines.
Explanation:
Answer:
B. blocking I/O
Explanation:
Most of the input and output request placed to the computer considers the blocking request. It means that the controls given cannot be returned to the given application until and unless the input/output is complete.
Thus, blocking the input/output does not return till the input and output is complete.
With a blocking I/O, the process is moved to a wait queue when the I/O request is made, and it moved backs to the ready queue as soon as the request is complete, thereby allowing the other processes to run in the meantime.
Thus (B) blocking I/O is the answer.
Answer: time of day, duration, due dates
Explanation: I am awsome
Answer:
- If a group of 9 kids have won a total of 100 trophies, then at least one of the 9 kids has won at least 12 trophies.
- If a person buys at least 400 cups of coffee in a year, then there is at least one day in which the person has bought at least two cups of coffee.
- The average of three real numbers is greater than or equal to at least one of the numbers.
Explanation:
1)
Suppose that each kid has less than 12 trophies
Total trophies = 100
Maximum trophies won by one kid = 11
total kids = 9
total number of trophies = 9 * 11 = 99 which contradicts the fact the total number of trophies are 100
2)
Suppose that person has less than 2 cups of coffee a day
Total cups of coffee = 400
he has bought at least one cup of coffee each day
which means
total number of cups of coffee = 1* 366 = 366 which contradicts the fact the person buys at least 400 cups of coffee in a year
3)
Average of three number = (a+ b+ c)/3
suppose that there are real numbers a, b, and c such that all three numbers are less than the average of the three numbers.
Let m be the average (a+b+c
)/3 = m. Then our assumption states that (a < m) and (b < m) and (c < m). By adding all the inequalities we get a + b + c < 3m. But m is defined to be (a+b+c)
/3 , so a + b + c = 3m. But now we have that 3m = a + b + c < 3m. So 3m < 3m which is an obvious contradiction. Thus our claim is true