Test 2 Programming (10/02/2025) Flashcards
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?
Variable
What programming statemrnt is
if a > c then
Condition
What programming keyword is used to be definite iteration
For or Foreach
What programming keyword is used to become indefinite iteration
While
What does MOD mean
Gives you the remainder
15 mod 2 would be 1
What does DIV mean
Gives you the integer rounded DOWN
17 DIV 2 = 8
8.5 rounds down to 8
How to represent DIV
Using 2 slashes
10 // 4 = 2
Examples of assignment operators
+=, =, -=, *=, /=, %=
What are examples of comparison operators
<, >, <=, >=, ==, !=
What type of programming construct is while
Iteration or loop
Do variables require speech marks around them when they are being printed
No.
When it says
RANDOM_INT(5, 10)
what numbers are included
5
6
7
8
9
10
Which Boolean word is used to test whether a condition is false
NOT
Which Boolean word is used to test whether a condition is true
AND
Whjch Boolean word is used to test if at least one of the conditions is true
OR
Count controlled iteration using a FOR statement is what type of iteration
Definite iteration
Condition controlled iteration using a WHILE loop is known as what type kf iteration
Indefinite