Pseudocode Flashcards
(26 cards)
What is pseudocode?
A high-level description of an algorithm that uses the structural conventions of programming languages.
True or False: Pseudocode can be executed by a computer.
False
Fill in the blank: Pseudocode is used to outline the _____ of a program.
logic
Which of the following is a common structure used in pseudocode? A) If statements B) Loops C) Functions D) All of the above
D) All of the above
What does ‘IF condition THEN’ represent in pseudocode?
A statement that executes a code if the condition is true.
What is the purpose of a loop in pseudocode?
To repeat a code based on a condition.
True or False: Pseudocode can include comments.
True
Which keyword is typically used to start a loop in pseudocode?
FOR or WHILE
What does ‘END IF’ signify in pseudocode?
The conclusion of an IF statement.
How is a variable usually declared in pseudocode?
Using the ‘SET’ or ‘DECLARE’ keyword.
What is the output of the following pseudocode? SET x = 5, IF x > 3 THEN OUTPUT ‘Greater’ ELSE OUTPUT ‘Smaller’.
Greater
What is the primary benefit of using pseudocode?
It helps programmers plan and visualize algorithms without worrying about syntax.
Fill in the blank: In pseudocode, an array can be represented as a _____ of elements.
list
What does ‘REPEAT UNTIL’ indicate in pseudocode?
A loop that continues until a specified condition is true.
What is the purpose of indentation in pseudocode?
To represent the structure of the code.
True or False: Pseudocode must adhere strictly to programming language syntax.
False
What is a common way to represent input in pseudocode?
Using the keyword ‘INPUT’.
What does ‘OUTPUT’ do in pseudocode?
It displays a value or message to the user.
What is the purpose of algorithms in programming?
To provide a step-by-step procedure for solving a problem.
What is a decision structure in pseudocode?
A structure that allows branching based on conditions, such as IF statements.
Fill in the blank: The main function of a _____ in pseudocode is to perform a specific task.
procedure
What does ‘WHILE condition DO’ signify in pseudocode?
A loop that continues executing as long as the condition is true.
True or False: Pseudocode can be used to communicate algorithms to non-programmers.
True
What is the significance of ‘CASE’ statements in pseudocode?
They allow multiple conditions to be analyzed.