Term
|
Definition
| a true or false statement. |
|
|
Term
| why do we use while and do loops? |
|
Definition
| to repeat sections of the code. |
|
|
Term
| What is a switch statement? |
|
Definition
| a statement used to select executable code. |
|
|
Term
| What does this symbol mean? "==" |
|
Definition
|
|
Term
| What does this symbol mean? "1=" |
|
Definition
|
|
Term
| What does this symbol mean? ">" |
|
Definition
|
|
Term
| What does this symbol mean? "<" |
|
Definition
|
|
Term
| What does this symbol mean? ">=" |
|
Definition
|
|
Term
| What does this symbol mean? "<=" |
|
Definition
|
|
Term
| What would we use operators for? |
|
Definition
|
|
Term
| When and why can we add an "else clause" to an if statement? |
|
Definition
| To provide code to test if an expression is false. |
|
|
Term
| What do we use a switch statement for? |
|
Definition
| To create branching in our code |
|
|
Term
what is wrong with this code? while (again = 'y'); |
|
Definition
|
|
Term
| what does a break statement do? |
|
Definition
| You can immediatly exit a loop. |
|
|
Term
| what does a continue statement do? |
|
Definition
| You can jump directly to the top of a loop. |
|
|
Term
| how does a while true loop work? |
|
Definition
| As long as the statement is true the loop continues. |
|
|
Term
| Which logical operator is this? "!" |
|
Definition
|
|
Term
| Give two examples of logical operators. |
|
Definition
|
|
Term
| What function generates a random number between 0 and atleast 32767. |
|
Definition
|
|
Term
| what does pseudorandom mean? |
|
Definition
|
|
Term
| What is wrong with this code? " int secretNumber = rnd() % 100 + 1; " |
|
Definition
| int secretNumber = rand() % 100 + 1; |
|
|
Term
| What number values are considered true? |
|
Definition
| Any non-zero number is considered true. 0 is considered false. |
|
|
Term
| How do you end a program using a "game loop"? |
|
Definition
|
|
Term
|
Definition
| A do loop executes a part of code and loops it until told otherwise. |
|
|
Term
| What is an infinite loop? |
|
Definition
|
|
Term
| What kind of things would be impossible without loops? |
|
Definition
|
|