Lesson 1 Flashcards
How many steps are there in the programming cycle? What are those steps?
There are seven steps in the programming cycle:
- Defining the problem (planning)
- Designing a solution
- Writing the program
- Compiling the program
- Debugging the program
- Testing the program
- Documentation of the program
What is input in the context of the input-process-output cycle?
Input is the data flowing into the system from an external source.
Example:
A thermometer linked to the system provides raw temperature data.
What happens during the processing stage of the cycle?
Processing is when the input data is manipulated into a more useful form.
Example:
A newspaper takes raw text from a news wire and formats it into a front page layout.
What is output in the input-process-output cycle?
Output is the information flowing out of the system, usually presented in a user-friendly way.
Example:
The keystrokes entered by a typist are displayed on the monitor.
What is a flowchart?
- A flowchart is a tool for analyzing processes and shows the arithmetic and logical procedures required to solve a computer problem.
- A flowchart helps to visually organize and sequence the steps required for solving a problem.
What do the symbols in a flowchart represent?
- Each symbol represents a specific function or operation.
How are the symbols in a flowchart connected?
- Symbols are connected by directional arrows that indicate the sequence of operations.
What do the terms inside the flowchart symbols represent?
- The terms represent the operation or activity the symbol stands for.
What is program flow and the three types of program flow?
- Program flow refers to the order in which individual statements, instructions, or function calls are executed or evaluated in a program.
- The three types are sequence, Selection (branching), and Repetition (looping).
What happens in the sequence type of program flow?
- In a sequence, the process is executed in a straightforward manner from one statement to the next.
What is selection (branching) in program flow?
- Selection involves making a choice between two alternatives based on a test. The logical expression is evaluated as True or False.
How does selection work when the expression is true or false?
- If the expression is true, a statement is executed, and the program continues. If false, the statement is skipped, and the next one is executed.
What is repetition (looping) in program flow?
- Repetition involves repeating a sequence of statements until a specified condition is met.