Shared Flashcard Set

Details

Game Developement Programming
chapter 2
26
Computer Science
11th Grade
03/18/2013

Additional Computer Science Flashcards

 


 

Cards

Term
What is truth?
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
Equal to
Term
What does this symbol mean? "1="
Definition
Not equal to
Term
What does this symbol mean? ">"
Definition
greater than
Term
What does this symbol mean? "<"
Definition
less than
Term
What does this symbol mean? ">="
Definition
greater than or equal to
Term
What does this symbol mean? "<="
Definition
less than or equal to
Term
What would we use operators for?
Definition
Scoring systems
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
while (again == 'y');
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
Logical Not
Term
Give two examples of logical operators.
Definition
&&
||
!
Term
What function generates a random number between 0 and atleast 32767.
Definition
rand()
Term
what does pseudorandom mean?
Definition
not truly random.
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
return 0;
}
Term
What is a "do" loop?
Definition
A do loop executes a part of code and loops it until told otherwise.
Term
What is an infinite loop?
Definition
A never ending loop
Term
What kind of things would be impossible without loops?
Definition
games
Supporting users have an ad free experience!