3.2 Programming Flashcards

1
Q

Data types (pseudo code)

A
  • integer (INT)
  • real (REAL)
  • Boolean (BOOL): 2 values (true/false, yes/no)
  • character (CHAR)
  • string (STRING)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

advantages of subroutine

A
  • allows code to be reused
  • would be easier to test
  • code could be changed/updated without affecting overall program
  • makes program easier to read/understand
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Selection equations

A

IF-THEN-ELSE statements
ELSE-IF statements
- nested (IF statement inside another)

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

Iteration examples

A

FOR loops
REPEAT-UNTIL loops
WHILE loops
DO-WHILE loops

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

Types of iteration statements

A
  • indefinite = no. of repeats depends on a condition (WHILE, REPEAT-UNTIL)
  • definite = repeat exact number of times (FOR)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly