S11 - 53 Programming basics Flashcards
1
Q
what are the 3 programming constructs?
A
Sequence, selection and iteration
2
Q
what is sequence in a program?
A
Executing one instruction after another
3
Q
name a few selection statements
A
IF
ELSE
4
Q
what are the 5 data types?
A
+ integer
+ real/float
+ boolean
+ character
+ string
5
Q
what are the 4 arithmetic operations?
A
+ (addition)
- (subtraction)
* (multiplication)
/ (division)
6
Q
a FOR loop is a…
A
counter controlled loop
7
Q
when is a for loop used?
A
A FOR loop is used when the number of iterations needed is known ahead of execution