Flowcharting and Pseudocode Writing Flashcards
Define algorithm.
It is a list of instructions for carrying out a process step-by-step.
It is a list of instructions for carrying out a process step-by-step.
Algorithm.
What are the 2 kinds of algorithm?
- Pseudocode
- Flowchart
Define pseudocode.
It is a written, step-by-step description of an algorithm using plain language.
Define flowchart.
It is a visual representation of an algorithm using symbols and arrows to show the flow.
It is a written, step-by-step description of an algorithm using plain language.
Pseudocode
It is a visual representation of an algorithm using symbols and arrows to show the flow.
Flowchart
What does the following shape represent?
OVAL
Terminal - beginning or end.
What does the following shape represent?
RECTANGLE
Process - represents an instruction or action to be performed.
What does the following shape represent?
DIAMOND
Decision - represents a decision point that can lead to different paths based on Yes/No or True/False answers.
What does the following shape represent?
HEXAGON
Preparation - represents a preparation step or initialization of a process.
What does the following shape represent?
ARROW
Flowline - represents the direction of the process flow.
What does the following shape represent?
CIRCLE
On-Page Connector - used to connect different parts of the flowchart on the same page.
What does the following shape represent?
BANNER
Off-Page Connector - represents the continuation of a flowchart onto another page.
What are the types of control structures?
- Sequential
- Conditional
- Iterative/Repetition
What is a loop?
It is repetition of a series of steps.
What is an infinite loop?
It is repeating flow of logic with no end.
Define sequential control structures.
It executes instructions one after the other in the order they appear in the code.
Define iterative/repetitive control structures.
It repeats a set of instructions multiple times, usually until a certain condition is met.
Define conditional control structures.
It executes instructions based on whether a certain condition is true or false.
What type of control structure is being demonstrated below?
If you have three instructions—first, print “Hello”; second, calculate the sum of two numbers; third, display the result—they will be executed in that exact sequence without any branching or repetition.
Sequential Control Structure
What type of control structure is being demonstrated below?
The program checks if the temperature is greater than 30. If true, it prints “It’s hot!”; otherwise, it prints “It’s cool.”
if temperature > 30:
print(“It’s hot!”)
else:
print(“It’s cool.”)
Conditional Control Structure
Repeats actions until a condition is met.
Iterative/Repetitive Control Structure
Makes decisions based on conditions.
Conditional Control Structure
Straightforward, step-by-step execution.
Sequential Control Structure