iOS10 Swift Playgrounds 1-7 Flashcards
algorithm
A step-by-step instructions or rules for solving a problem. E.g., a list of steps used to make a cup of tea can be considered an algorithm.
operator (list all types)
A symbol that represents an action on one or more values. Four main types:
Arithmetic (+, -, *, /) does basic math.
Assignment (=) assigns a value to an object.
Comparison (==, !=,, , =) compares and returns Boolean value of true or false.
Logical (&&, !, ||) combines or inverts Boolean value and returns true or false.
Boolean
A type that has a value of either true or false. For example, 9
bug / debug
An error in code that prevents a program from running as expected. To find and fix errors in code that prevent a program from running correctly.
call
to run (a function or a method). E.g., “I called the move() function.”
command
Code that tells the program to perform a specific action.
compose / decompose
To combine small parts of a program to solve a larger program. OR to break a large problem into smaller, more manageable pieces.
conditional code
Code that start with an “if” or has loops. Runs based on conditions.
define
to provide the explicit value or behavior of a newly created piece of code, such as a function, variable, or custom type.
nest
The act of placing one block of code (loops or conditional if statements) inside another to create inner blocks within outer blocks.
function
A named set of commands that can be run whenever needed.
if statement (list all parts)
A code structure that uses any combination of if blocks, else if blocks, and else blocks.
inner / outer
When one loop or block of code is nested inside another loop or block of code. E.g., an inner loop is nested inside an outer loop. An inner conditional block is inside an outer conditional block.
loop (describe first 2 types)
A block of code that’s repeated a certain number of times (e.g., a for loop) or until a condition is met (e.g., a while loop).
A for loop is a block of repeated code that runs a certain number of times.
A while loop is a block of code that runs for as long as a given condition is true. When the condition changes to false, the loop stops running.
pattern
A repeating set of circumstances or data.