Mason B. answered 11/09/22
CS T.A. and Tutor. Software Engineer and Master's Student
Psuedocode in programming can be simply put as a set of steps to go from point a to point b written in an informal code syntax, an algorithm and psuedocode are basically one in the same, psuedocode has the benefit of the visualization of how we would transfer an algorithm to actual code.
A good way to explain this would be the action of washing the dishes, you may not think that washing the dishes is an algorithm but if you break down the steps you can see that it fits the definition. So lets break it down, you run the water until it gets hot, you get a dirty dish, you apply soap onto the dish, you scrub the dish with a sponge, you rinse the dish, and finally you put it onto the drying rack, you do this for all dishes. So let's put this into pseudocode.
void washDishes() {
turnOnWater();
while (dirtyDishesExisting()){
getDirtyDish();
applySoapToDish();
scrubDish();
rinseDish();
putDishOnDryingRack();
}
}