Programming fundamentals Flashcards

1
Q

What are the three constructs that are used to control the flow of a program?

A

Sequence, selection, iteration

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

What is a sequence?

A

Structuring code into a logical, progressive order

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

What is a selection?

A

Decision making using if statements

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

What is iteration?

A

Repeating code using for or while loops

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

What is a Variable?

A

Used to store data in programs

Can be changed as the program runs

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

What is a constant?

A

A fixed variable. Data does not change

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

Comparison operators

A

used to compare two data values

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

Greater than operator

A

>

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

Less than operator

A

<

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

Greater than or equal to operator

A

> =

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

Less than or equal to operator

A

<=

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

Equal to operator

A

==

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

Not equal to operator

A

!=

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

Modulo division operator

A

MOD (%)

reveals the remainder from the last whole number

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

Integer division operator

A

DIV (//)

reveals a whole number

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

What is the operator for ‘to the power of’

A

e.g. 2^3 = 8 is the same as:
2 to the power of 3 = 8