Prgramming (flowcharts And Pseudocode) Flashcards
What is meant by a data type?
A data type specifies the value a variable can hold. And determines the range of values and operations performed on the variable.
What are some examples of data types?
Integer: Represents whole numbers (e.g., 5, -10).
Real (Float): Represents decimal numbers (e.g., 3.14, -0.5).
Boolean: Represents true or false values.
Character: Represents a single character (e.g., ‘A’, ‘x’).
String: Represents a sequence of characters (e.g., “Hello, World!”).
What are constants and variables?
Constants- fixed values that don’t change in the program (π}
Variables- Named memory locations that can hold different values during program execution.
What’s iteration?
Iteration refers to repeating a set of instructions a certain number of times or until a condition is met.
State the types of iteration:
a) Definite (Count-Controlled) Iteration: Executes a fixed number of times (e.g., using loops like for or while).
b) Indefinite (Condition-Controlled) Iteration: Repeats until a specific condition becomes false (e.g., using while loops).
What’s selection?
Selection allows the program to choose between different paths based on a condition (usually using if, else if, and else statements).
What are nested structures?
involve combining multiple control structures (e.g., loops and conditionals) within each other. For example, an if statement inside a while loop.
Why are meaningful identifiers important?
Correct naming of variables, constants and program elements enhance code readability.
Instead of using vague names like x, opt for more descriptive identifiers (e.g., total_sales).