WorksheetsAP CSP - Unit 4 Code.org Review
Total questions: 20
Worksheet time: 11mins
\n means to add something to a new line in your program
True
False
What is an expression?
numbers, strings, or booleans
combination of operators and values that evaluate to a single value
named group of programming instructions, also called a procedure
affects how the program runs depending on different statements that are based on Boolean values
What will be displayed after this code is run?
You Lose!
Perfect Game!
You Win!
Thinking about truth tables, what does this set of logical operators evaluate to?
! TRUE
True
False
A student is writing a program to model different real-world events using simulations.
Which of the following will generate a result that would best be stored using a Boolean variable?
A simulation of flipping a coin
A simulation of rolling a fair die (with sides numbered 1 through 6)
A simulation of the temperature in a location over time
A simulation of traffic patterns on a road
What number will be output by the console.log command on line 7?
10
20
100
200
What is happening in this code?
the variables are being created
the function updateScreen is being declared
the function updateScreen is being called
the function updateScreen is being updated
What is happening in this code?
the variables are being created
the function singChorus is being declared
the function singChorus is being called
the function singChorus is being updated
What are values?
numbers, strings, or booleans
fancy name for add, subtract, divide, multiple
named group of programming instructions, also called a procedure
refers to the remainder
Thinking about truth tables, what does this set of logical operators evaluate to?
TRUE && FALSE
True
False
You should create functions at the top of your program and variables at the bottom of your program.
True
False
In the program, the initial value of the x is 5 and the
initial value of y is 10.
What is displayed after the program is run?
Foxtrot
Hotel
November
Yankee
Once this code is run, what is the value of tickets?
68
103
35
33
a value passed to a function
parameter
argument
What type of variable is this?
Not a variable
variable with concatenation
variable with counter pattern
variable string
What is a variable?
numbers, strings, or booleans
combination of operators and values that evaluate to a single value
fancy name for addition, subtraction, multiplication, and division
portion of the code and program that can hold a value
To attend a particular camp, a student must be either at least 13 years old or in grade 9 or higher,
but must not yet be 18 years old.
Let age represent a student’s age and let grade represent the student’s grade level.
Which of the following expressions evaluates to true if the student is eligible to attend the camp and evaluates to false otherwise?
((age ≥ 13) OR (grade ≥ 9)) AND (age ≤ 18)
((age ≥ 13) OR (grade ≥ 9)) AND (age < 18)
((age ≥ 13) OR (grade ≥ 9)) OR (age ≤ 18)
((age ≥ 13) OR (grade ≥ 9)) OR (age < 18)
"You win!" never displays. What change would fix this issue?
Line 1 - change the variable name to totalScore.
Line 3 - remove var.
Line 4 - change the conditional to >= 5.
Line 5 - change to a getText command.
<-- is written as = in Javascript.
True
False
