Answer:
A is the input array
B = []
; %B is initially an empty array
for i = 1:length(A)/2 %iterates over A until the midpoint of A
B(i) = A(i) + A(end + 1 - i); %This adds the numbers from the first half and %second half of A, and stores in B
end
disp(B)
Answer:
These are the supplies in the list:
[‘pencil’, ‘notebook’, ‘backpack’, ‘pen’, ‘calculator’]
Explanation:
The line return (\n) character will be in the output (so there will be a change of line), but it will NOT be visible as it would have been interpreted as a special character.
So the output will be on 2 different lines, with no \n visible.
If the command would have been: print('These are the supplies in the list:\n', supplies), with single quotes (') instead of double quotes (") then then \n would have been printed but not interpreted as a special character. At least in most computer language. Since we don't know of which language the question refers to, we can't be sure at 100%.
I have been running into the same problem, they haven't said anything but that might be the case.
Answer:
(E)
Explanation:
I think it's E because it's the only answer that makes sense I guess!