A programmer has written the following subprogram to process text inputs.
function processText(phrase)
total = 0
for i = 0 to length(phrase) - 1
character = subString(phrase, i, 1)
if character >= "A" and character <= "Z" then
total = total + 1
endif
next i
return total
endfunction
State the purpose of this subprogram.
33 exam-style questions on Edexcel IGCSE Computer Science Subprograms. Each one has a worked solution and a mark scheme showing where the marks go.