Test 2 Programming (10/02/2025) Flashcards

1
Q

What is the term for a named location within the computer’s memory where a single item of data is stored that can be changed while a program is running?

A

Variable

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

What programming statemrnt is

if a > c then

A

Condition

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

What programming keyword is used to be definite iteration

A

For or Foreach

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

What programming keyword is used to become indefinite iteration

A

While

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

What does MOD mean

A

Gives you the remainder

15 mod 2 would be 1

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

What does DIV mean

A

Gives you the integer rounded DOWN

17 DIV 2 = 8
8.5 rounds down to 8

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

How to represent DIV

A

Using 2 slashes

10 // 4 = 2

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

Examples of assignment operators

A

+=, =, -=, *=, /=, %=

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

What are examples of comparison operators

A

<, >, <=, >=, ==, !=

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

What type of programming construct is while

A

Iteration or loop

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

Do variables require speech marks around them when they are being printed

A

No.

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

When it says

RANDOM_INT(5, 10)

what numbers are included

A

5
6
7
8
9
10

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

Which Boolean word is used to test whether a condition is false

A

NOT

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

Which Boolean word is used to test whether a condition is true

A

AND

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

Whjch Boolean word is used to test if at least one of the conditions is true

A

OR

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

Count controlled iteration using a FOR statement is what type of iteration

A

Definite iteration

17
Q

Condition controlled iteration using a WHILE loop is known as what type kf iteration

A

Indefinite