Input, Processing and Output Flashcards

1
Q

What are the two key steps in program design?

A
  1. Understand the task the program will perform.
  2. Determine the steps needed to perform the task.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is an algorithm?

A

A well-defined logical sequence of steps to perform a task.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are pseudocode and flowcharts used for in program design?

A

Pseudocode is used to focus on design without syntax rules, and flowcharts graphically represent program steps.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What symbols are used in flowcharts, and what do they represent?

A
  • Terminal symbols: Start/End (Ovals)
  • Input/Output symbols: Input/Output operations (Parallelograms)
  • Processing symbols: Process steps (Rectangles)
  • Connector symbols: Connect different parts (Small circles)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the difference between a syntax error and a logic error?

A
  • Syntax error: Violation of language rules.
  • Logic error: Program runs but produces incorrect results.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the three steps in the Input, Processing, Output (IPO) structure?

A
  1. Receive input
  2. Process data
  3. Produce output
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is an IPO chart?

A

A planning tool that describes a program’s input, processing, and output.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the three main control structures in programming?

A
  1. Sequence
  2. Selection
  3. Repetition
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a variable in programming?

A

A named storage location in memory that holds data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the rules for naming variables?

A
  • Must be one word (no spaces).
  • Usually no punctuation, only letters and numbers.
  • First character cannot be a number.
  • Should indicate purpose.
  • Multiword names use underscore or camelCase.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a string in programming?

A

A sequence of characters used as data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a string literal?

A

A string value written directly in the program code, enclosed in quotation marks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is an assignment statement?

A

A statement that sets a variable to a specified value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the order of operations in math expressions?

A
  1. Parentheses
  2. Exponents
  3. Multiplication/Division/Modulus (left to right)
  4. Addition/Subtraction (left to right)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the difference between an integer and a real number?

A
  • Integer: No decimal point.
  • Real number: Includes a decimal point.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a named constant?

A

A value that cannot be changed during execution, typically declared in ALL_UPPERCASE naming.

17
Q

What is the purpose of program documentation?

A

To explain how the program works, through external documentation for users and internal comments in the code.

18
Q

What are the types of comments in programming?

A
  • Block comments: Multi-line, for lengthy explanations.
  • Line comments: Brief, for specific statements.