1/17
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
boolean value
either true or false
(every decision-making system uses boolean logic)
logical operators
not, and, or
evaluate a boolean value. the operand for a logical operator is either a boolean expression or a single boolean value.
relationship operators
≤, ≥, ==, =, <, >
used to test the relationship between two variables
abstraction
knowing that something works but not knowing how it works
PRIMM
P- predict (look at code and guess what will happen before running it)
R- run (execute the code, see if your prediction is correct)
I- investigate (experiment by changing values and observing results)
M- modify (adapt the code to solve problems or meet different requirements)
M- make (create something new based on your understanding)
variable
storage container
Integer
First three letters of the word integer “int” is the code. a whole number used to complete a mathematical computation.
Nested conditional statements
Conditional statements within conditional statements
Conditional Loop
A loop that executes a block of statements until a Boolean condition evaluates to true, with the condition checked before each iteration: provided by the exam reference sheet as “REPEAT UNTIL(condition)”
Conditional statements
statements which affect the sequential flow of control by executing different statements based on the value of a Boolean expression.
Infinite loop
a conditional loop that continues indefinitely because the terminating condition never becomes true
Iteration
a repeating portion of an algorithm that repeats a specified number of times or until a given condition is met
while loop
a type of conditional loop in the python language that repeatedly executes a block of statements as long as a Boolean condition remains true, with the condition checked before each iteration using the while keyword
Counting loop
a loop that executes a block of statements a specified number of times; provided by the exam reference sheet as “REPEAT n TIMES”
for loop
a type of counting loop in the Python programming language that iterates over a sequence (such as a list, string, or range) or executes a specified number of times using the for keyword and in operator
How does the for loop know when to stop?
When would you use a for loop instead of a while loop?