You gave the answer in your question
Answer:
sum = 0 must be before for loop. If inside for loop, it will keep resetting sum to 0 each iteration.
Explanation:
hope this helps
Answer: Buffered
Explanation: Buffered memory is the memory contains registers between the modules of dynamic random access memory(DRAM).It is also known as registered memory. The purpose of using buffered memory to increase the stability and decrease the electrical load.
Other options are incorrect because ECC(error correcting code)memory is for correction and detection of incorrect data, non- parity memory is that don't utilize ECC module and multi-channel used for the increment in the rate of transmission between memory controller and DRAM.
Thus,the correct option is option buffered memory because of serial communication pattern with memory controller and parallel communication technique with chips .
Answer:
li=list(map(str,input().strip().split()))#taking input of the string.
#swapping first and last element.
temp=li[0]
li[0]=li[-1]
li[-1]=temp
print(li)#printing the list.
Explanation:
I have taken the list li for taking the input of strings.Then after that swapping first and last element of the list.Then printing the list.
My opinion is the answers A and D. I would choose A if you can only choose one, though.