Unit 1 SDD - Design - Pseudocode, Data Types & Structures Flashcards
What is pseudocode?
A popular text-based design methodology using English-like phrases to describe processes
Pseudocode allows for easy representation of algorithms without strict syntax.
Does pseudocode follow specific standards?
No, different teams/companies often have their own ‘style’
This lack of standardization can lead to confusion among different developers.
How are steps in pseudocode typically organized?
Steps are often numbered, with refinements using a point and a second number
This structured approach helps in refining the design progressively.
What is a benefit of using pseudocode?
Allows quick writing of possible algorithms without worrying about syntax
It simplifies the process of algorithm design.
What are the two areas designers consider to identify data that needs to be stored?
- The functional requirements, especially inputs and processes
- The algorithm designed using a design methodology
These considerations help in understanding the necessary data structures.
What is the defining characteristic of pseudocode compared to structure diagrams and flowcharts?
Pseudocode does not have one specific set of rules or style
In contrast, structure diagrams and flowcharts have clearly defined rules and symbols.
During the design process, what should be considered regarding data?
The amount and type of data being stored
This consideration is crucial for declaring variables and arrays effectively.
Fill in the blank: Pseudocode is a textual design methodology that represents the main steps and refinements in a program by using a hybrid _______ description for each step.
[English/code]
True or False: Pseudocode can be used to quickly write down an algorithm while considering syntax.
False
Pseudocode allows writing algorithms without considering syntax.
How do you create a new variable in Pseudocode?
DECLARE nameofvariable AS data type
Example: DECLARE username AS string
What is the syntax for assigning a value to a variable in Pseudocode?
SET nameofvariable TO value
Example: SET username TO ‘Bob’
How do you receive input from the user in Pseudocode?
RECEIVE variable FROM datatype KEYBOARD
Example: RECEIVE name FROM (string) KEYBOARD
What is the command to display a variable’s value on screen in Pseudocode?
SEND variable TO DISPLAY
Example: SEND name TO DISPLAY
How can you change a variable’s value using the SET command?
SET nameofvariable TO new value
Example: SET name TO ‘John’
What is one way to change a variable’s value using a calculation in Pseudocode?
SET variable TO variable + value
Example: SET score TO score + 4