Sequence, Selection and Iteration Flashcards

(4 cards)

1
Q

What are the naming conventions for identifiers?

A
  • Uppercase is the convention for constants
  • Identifiers have meaningful names and cannot have spaces
  • Case is important - psHours vs pshours
  • Some words are reserved and can’t be used for identifiers e.g. return
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a sequence?

A

Executing one statement after another

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

What is iteration?

A

Repeating a section of code while a Boolean expression is true (while) or a fixed number of times (for)

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

What is branching?

A

Branching to a different place in the program according to the value of a Boolean expression (if/elseif/else, switch/case)

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