Pseudocode Flashcards
What is Pseudocode
It’s an informal way of describing an algorithm or the logic behind a program using a combination of programming-like constructs, natural language, and a human-readable manner, without adherence to the strict syntax of a programming language.
What are the characteristics of pseudocode
• Informal language: Uses natural language for descriptions and combines it with programming keywords and structures.
• It’s readable, emphasizes communication, clarity and readability using natural language.
• It’s structured, using indentation and keywords to represent control structures.
• It’s programming-language independent.
• No strict syntax: Doesn’t have rigid syntax rules. The focus is on clarity and conveying the logic, not on being executable by the computer.
What are the common pseudocode conventions (standards or rules)?
• Use of keywords such as begin, if, else, end, then, while, for, repeat, until, input, output, set, get, return IN CAPS
• Indentation to show the structure of code blocks such as the body of a loop
• Variables with descriptive names
• Operators such as logical and mathematical ( = + - * / < > <= >= AND OR NOT)
• Comments to explain parts of the pseudocode
• U always begin with BEGIN and end with END
Elaborate the focus on logic of the pseudocode idea
• Planning the programming structure before writing actual code
• Communicating the algorithm to others
• Serves as documentation
Elaborate the bridge to coding idea of pseudocode
The transition from the initial problem analysis and actual coding process, to writing code in a specific programming language.
What are the main differences between diagrams/flowcharts and pseudocode?
• The firsts are visual representations, while pseudocode is pure text.
• Pseudocode is best for explaining detailed logic about the code.
• Flowcharts are better to visualize the overall flow.
Explain the similarities between pseudocode and flowcharts
• Both are used in the early stages of software development to represent the logic of an algorithm or program before actual coding begins. Similar purposes, different approaches.
• Represent the steps of an algorithm in a clear and understandable ways.
• Used for the Planning and Design phase of the software development, defining logic and structure.
• Communication of the algorithms logic between programmers and non-programmers
• Serve as documentation for the programs logic.
In what aspects can we relate pseudocode to programming languages
• Abstraction level
• Conceptual blueprint
• Language independence
• Translation process
How do programming languages and pseudocode relate in the abstract aspect
Pseudocode has a higher level of abstraction than a programming language because it focused in the logic and flow eather than in the syntax and grammar rules of the language.
How do programming languages and pseudocode relate in the conceptual blueprint aspect
Pseudocode is the blueprint programmers use for the actual code with the syntax of the programming language.
How do programming languages and pseudocode relate in the language independence aspect
Pseudocode is not tied to any specific programming language, so it’s useful for different programming language users who collaborate.
How do programming languages and pseudocode relate in the translation process aspect
The process involves replacing pseudocode keywords, operators and declaration of variables with the equivalent syntax, functions and methods of the target language.