1.
What are a compact and informal high-level explanation of a computer programming algorithm that needs the structural conventions of a programming language? It is a plan for human reading rather than machine reading.
Correct Answer
A. Pseudocode
Explanation
Pseudocode is a compact and informal high-level explanation of a computer programming algorithm that uses structural conventions of a programming language. It is a plan designed for human reading rather than machine reading. Pseudocode allows programmers to outline the logic and steps of an algorithm before actually implementing it in a specific programming language. It serves as a bridge between human understanding and actual code, making it easier to communicate and visualize the algorithm's flow and structure.
2.
In creating pseudocodes:
use simple English.
Correct Answer
A. True
Explanation
The given correct answer is "true" because when creating pseudocodes, it is recommended to use simple English. This means that the pseudocode should be written in a language that is easy to understand and interpret, without the need for complex syntax or technical jargon. By using simple English, the pseudocode becomes more accessible to a wider audience and can be easily translated into actual programming code.
3.
In creating pseudocodes:
Put many commands on a line.
Correct Answer
B. False
Explanation
In creating pseudocodes, it is not recommended to put many commands on a single line. Pseudocode is a way of representing algorithms using a combination of natural language and programming language-like constructs. It is intended to be easily understandable by humans and serves as a blueprint for writing actual code. Putting many commands on a single line can make the pseudocode difficult to read and understand, defeating its purpose. Therefore, the statement "Put many commands on a line" is false.
4.
In creating pseudocodes:
Start from the bottom, then work to the top.
Correct Answer
B. False
Explanation
In creating pseudocodes, the process usually starts from the top and works its way down. This allows for a logical flow of the code, where each step builds upon the previous ones. Therefore, the given statement that suggests starting from the bottom and working to the top is incorrect.
5.
In creating pseudocodes:
place important words in bold.
Correct Answer
B. False
Explanation
There's no standard convention for placing important words in bold in pseudocode. Pseudocode is meant to be a high-level description of an algorithm, focusing on logic and structure rather than specific formatting or styling. It's typically written in plain text to ensure clarity and simplicity.
6.
Keep the statement language ______________ while writing a pseudo code.
Correct Answer
B. Independent
Explanation
The correct answer is "independent." This term is used to describe the desired language for writing the pseudo-code statement. Pseudocode is a way of representing algorithms using a combination of natural language and programming language-like constructs. The use of "independent" suggests that the language used in the pseudo-code should not be influenced or restricted by any particular programming language. It should be able to convey the algorithmic steps in a clear and understandable manner, without being tied to specific syntax or conventions.
7.
Capitalize the initial keyword – This is a rule when writing pseudocode.
Correct Answer
A. True
Explanation
The explanation for the correct answer is that capitalizing the initial keyword is indeed a rule while writing pseudo code. This convention helps to distinguish the keywords from other variables or identifiers in the code, making it easier to read and understand. By capitalizing the initial keyword, it becomes more visually prominent and stands out within the code.
8.
Which of the following is not a keyword?
Correct Answer
D. Start
Explanation
The keyword "start" is not a keyword in most programming languages. Keywords are reserved words that have a specific meaning and purpose in the language. "Read", "Write", and "endif" are commonly used keywords in programming languages, but "start" is not typically recognized as a keyword.
9.
______________ is used to show hierarchy in a pseudo code.
Correct Answer
B. Indentation
Explanation
Indentation is used to show hierarchy in a pseudo code. Indentation helps to visually represent the structure and nesting of different blocks of code. By indenting the code, it becomes easier to understand which statements are part of a specific loop, condition, or function. It improves readability and helps in avoiding confusion while writing or reading pseudo code.
10.
The statement that tells the computer to get a value from an input device and store it in a memory location.
Correct Answer
A. Read
Explanation
The read statement is used in programming to get a value from an input device and store it in a memory location. It’s a way to take user input or read data from a file or other input stream. Please note that understanding the principles of programming, such as the concept of reading input, is crucial for effective software development. Always ensure to follow best coding practices when working with programming languages.