2.2.1 Programming fundamentals Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is a variable?

A

Part of a program that can be assigned a specific value

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

What are the characteristics of a variable?

A

Consists of a descriptive identifier and the value assigned to it.
Can be changed within a program as it runs and is not fixed

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

What is a constant?

A

Value that cannot be changed or edited within a running program

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

What does the input command require?

A

The user to type in a response to a question that can be processed in some way

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

What is an output?

A

Displaying a message or returning a response to the user

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

What is the print command used for?

A

Display an output, using quotation marks

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

What is a sequence?

A

The act of carrying out a step-by-step process in a logical order

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

What is iteration?

A

The act of repeating any process until a specified result is reached

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

What can be used to repeat a question until a specific answer is provided?

A

While loop

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

What is selection?

A

Allows decisions to be made within the program using if and else statements.

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

What are all the arithmetic operators?

A

*
/
MOD
DIV

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

What does MOD stand for?

A

Modulus

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

What does DIV stand for?

A

Quotient

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

What is the function of +?

A

Addition of two or more values

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

What is the function of -?

A

Subtraction of one value from another

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

What is the function of *?

A

Multiplication of values

17
Q

What is the function of /?

A

One value divided by another

18
Q

What is the function of MOD?

A

returns the remainder after a division

19
Q

What is the function of DIV?

A

divided but returns only a whole number or integer

20
Q

What is the function of ^?

A

one value to the power of another

21
Q

Why are Boolean operators used?

A

Used in programs to define relationships, using Boolean logic, between data values

22
Q

What are all the Boolean Operators?

A

AND
OR
NOT

23
Q

What is the function of AND?

A

If two or more statements are true

24
Q

What is the function of OR?

A

If either statement is true

25
Q

What is the function of NOT?

A

To revers the logical results of a statement

26
Q

Why are comparison operators used?

A

Used by programmers to test the relationship between two values

27
Q

What are all the comparison operators?

A

==
!=
<
<=
>
>=

28
Q

What is the function of ==?

A

Exactly equal to

29
Q

What is the function of !=?

A

Not equal to

30
Q

What is the function of <?

A

Less than

31
Q

What is the function of <=?

A

less than or equal to

32
Q

What is the function of >?

A

Greater than

33
Q

What is the function of >=?

A

greater than or equal to