Programming Contrstucts Flashcards

(11 cards)

1
Q

Define a Variable

A

A named location in computer memory used to hold data when a program is running. The value of the variable can change while the program is running

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

Define a Constant

A

A named location in computer memory used to hold data when a program is running. The value of the variable cant change while the program is running and remains constant

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

Define a Boolean operator

A

An operator that allows conditions to be combined then evaluated , the outcome is a Boolean variable

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

Define a Arithmetic Operator

A

Enables arithmetic operations to be carried out using variable

+,-,*

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

Define an Input Statement

A

A statement used to capture data which is to be used in the program

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

Define an Output Statement

A

A statement used to output data and information from the program

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

Define an Assignment Statement

A

A statement that assigns a value to a variable, constant or other data structure

A= b+c

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

What are the three program control structures

A

Sequence
Selection
Iteration

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

Define Sequence

A

denotes the order in which the instructions are carried out by the computer

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

Describe Selection

A

In selection a condition is used to decide which piece of code should be executed.

This is acheived through the use of IF statements and BOOLEAN operateors

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

Describe Iteration

A

another word for reptation

Repetitions is used when a section of code is to be carried out more than once

This can be acheived throihh loops

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