1/14
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress

What number will be output by the console.log command on line 7?
100

What number will be output by the console.log command on line 5?
16

What number will be output by the console.log command on line 5?
35

What text will be output by the program?
30 or more

What text will be output by the program?
Output D

What will be the order of letters printed to the console when this program is run?
a b c b c

"You win!" never displays. What change would fix this issue?
Line 3 - remove var

When this function is called, the smaller of two numbers is displayed. What Boolean expression would not work in line 12 in order to accomplish this goal?
num1 == num2

This function chooses the screen to display based on the score. What is the correct way to call this function?
checkWin ( ) ; →
There is repeated code in these onEvent blocks. Choose the correct code for the updateScreen() function which would be called in each of the onEvent blocks.
function updateScreen() {
setText("counter_label", "counter");
if (counter == 0) {
setProperty("counter_label", "font-size", 24);
}
}
A movie theater charges different ticket prices based on a customer's age. The prices are shown in the table below.
The customer's age is stored in the variable age and the price is stored in the variable price. Which piece of code will correctly decide the price for each ticket.
if (age >= 65) {
price = 6;
} else if ((age > 12)) {
price = 8;
} else {
price = 5;
}
A museum charges different prices based on the day of the week and age of the visitor. The pricing rules are shown below.
On Tuesday and Thursday children 10 and under get in free ($ 0).
For all other days and ages the cost is ten dollars ($ 10).
The visitor's age is stored in the variable age, the day of the week is stored in a variable day, and the price in dollars is stored in the variable price. Which piece of code will correctly decide the price for each ticket.
if ((day == "Tuesday" || day == "Thursday") && (age <= 10)){
price = 0;
} else {
price = $10;
}

What will the value of the variable bags be at the end of the flowchart shown here?
2
Choose the correct definition for Conditional Statement
affects the sequential flow of control by executing different statements based on the value of a Boolean expression
Which of the following is true of functions?
Functions can help remove repeated code from a program