Answer: Atomic operations
Explanation: Atomic operations are the process in which are related with the programs which execute in the independent manner and having no relation with other processes or functions.
It is helpful operation in the parallel processing system.The operation assures about being carried out at rapid rate and do not face any deadlock during execution.This does not alter the rate of the system.
Update it so it wont do that
Input devices are things that receive info, such as mice, a keyboard, microphone etc.
Output devices are things that allow the computer to express info, such as a monitor, speaker, headphones, etc
Answer:
Following are the code to this question:
def pairSum(a,x): #find size of list
s=len(a) # use length function to calculte length of list and store in s variable
for x1 in range(0, s): #outer loop to count all list value
for x2 in range(x1+1, s): #inner loop
if a[x1] + a[x2] == x: #condition check
print(x1," ",x2) #print value of loop x1 and x2
pairSum([12,7,8,6,1,13],13) #calling pairSum method
Output:
0 4
1 3
Explanation:
Description of the above python can be described as follows:
- In the above code, a method pairSum is declared, which accepts two-parameter, which is "a and x". Inside the method "s" variable is declared that uses the "len" method, which stores the length of "a" in the "s" variable.
- In the next line, two for loop is declared, in the first loop, it counts all variable position, inside the loop another loop is used that calculates the next value and inside a condition is defined, that matches list and x variable value. if the condition is true it will print loop value.