teach-ict.com logo

THE education site for computer science and ICT

Answer: Question 8


Answer:

This is the flowchart of converting a sentence into Pig Latin.

 

If yours is very different to ours then double check your logic and make sure that it does work correctly

image

COMMENT:

Note that the flowchart is stating that an 'empty' output sentence should be produced before the loop even starts.

The reason for this is that if you absolutely know that you will be using a variable, then you should give it a value as soon as possible, even if it is just a sentence that says 'create an empty sentence'.

In programming terms this is called 'initialising a variable' and it is a very important part of programming.