Pseudocode is a simple, stripped-down version of a programming language [→] with relaxed syntax [→] rules used to explain logic, code, or semantics. To make it easy to understand, it usually has much more natural language constructs i.e: English, French words, etc., than the near cryptic constructs used in programming languages.
Use cases and Examples
As mentioned above, pseudocode is used as a tool to walk through what a program needs to do. It can be used to teach or as a tool to think up optimal programming solutions.
Here is an example pseudocode that applies a discount to a purchasePrice
01: User inputs purchasePrice 02: 03: if purchasePrice equals or is greater than 40 04: finalPrice is 80% of purchasePrice 05: else 06: finalPrice is same as purchasePrice 07: 08: output finalPrice
There is no defined syntax for pseudocode. The goal is to convey programming ideas without the overhead of making sure the language is used in its most correct way.
Here is another article you might like 😊 "What is race condition?"