No student devices needed. Know more
15 questions
What number will be output by the console.log command on line 7?
10
100
20
200
What number will be output by the console.log command on line 5?
10
11
12
13
16
What number will be output by the console.log command on line 5?
10
25
30
35
What text will be output by the program?
Less than 10
Less than 20
Less than 30
30 or more
What text will be output by the program?
Output A
Output B
Output C
Output D
Output E
What will be the order of letters printed to the console when this program is run?
a b c
a b c b c b c
a b c b c
a b c a
"You win!" never displays. What line is responsible for this error?
1
3
4
5
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?
This function chooses the screen to display based on the score. What is the correct way to call this function?
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.
A movie theater charges different ticket prices based on a customer's age. The prices are shown in the table.
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.
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.
What will the value of the variable bags be at the end of the flowchart shown here?
1
2
3
4
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
stores information as a number, String, or Boolean
joins together two or more strings end-to-end to make a new string
an ordered sequence of characters
Which of the following is true of functions?
Programs written with functions run more quickly
Functions can help remove repeated code from a program
Replacing repeated code with a function will reduce the number of commands the computer needs to run
Functions are called once but can be declared many times
Explore all questions with a free account