Note AcademyNote Academy

Computer Science · Oct / Nov 2024 · Paper 22 · Question 10

2210

As printed in the paper

The question as text

The function LENGTH(X) calculates the length of a string X Write the pseudocode statements to: • allow a line of text to be input to an appropriate variable • store this line of text in a text file called Main.txt • calculate the length of the line of text and output the text in lower case along with its length • store the lower-case line of text in a text file called Lowercase.txt Make sure that any variables used are declared and that both text files are closed after they have been used. [6]

Read automatically from the paper; the printed page above is exact.

Show the answer and mark scheme

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.