165,264 views
2 votes
2 votes
Define pseudo code and show the different ways it can be used?

User Minseok
by
2.8k points

1 Answer

16 votes
16 votes

Answer:

Pseudocode basically means fake code.

Step-by-step explanation:

Sometimes, when you want to write some code in an easy way for people to understand you would write the code using made-up examples that represent the real value. Pseudocode is also used to first outline the code you are trying to write. So you can work from your outline and convert it to functional code.

Although usually, the syntax should be the same as the coding language it is representing.

An example would be: if I had to show you a script for a train journey and I wanted you to easily be able to understand it, I could do something like this:

function trainJourney() {

trainEngineStart();

trainMoveForwards();

trainTurnLeft();

trainTurnRight();

trainEngineStop();

}

None of the above code would actually work, but its a representation of what the code should be doing.

Hope this helped!

User Hare Kumar
by
3.0k points