If-Statements
Quiz
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Medium
Rashad Davis
Used 26+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Aria, Ava, and Mia are developing a weather app. In their weather app, what would be the purpose of using an if statement?
To decide whether to display 'Sunny', 'Rainy', or 'Cloudy' based on the weather data
To display the highest temperature of the day
To count the number of times the app has been opened
To change the background color of the app
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does the if statement in the code do when the count reaches 20?
Display a message
Reset the count to 0
Set the screen to "gameOverScreen"
Set the screen to "gamePlayScreen"
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What should be added to the down arrow event handler to set the screen to game over when it reaches -5?
If count is equal to -5, then set the screen to "gameOverScreen"
If count is equal to 20, then set the screen to "gamePlayScreen"
If count is equal to -5, then set the screen to "gamePlayScreen"
If count is equal to 10, then set the screen to "gameOverScreen"
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What happens when the if statement is triggered by clicking the up arrow 20 times?
The screen changes to "gamePlayScreen"
The final score is displayed
The count is reset to 0
The screen changes to "gameOverScreen"
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the value of count when the if statement for the up arrow button is triggered?
15
10
20
25
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the value of count when the if statement for the down arrow button is triggered?
-15
-10
-5
0
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the event handler for the up arrow button?
onEvent("leftButton", "click", function() {
onEvent("rightButton", "click", function() {
onEvent("downButton", "click", function() {
onEvent("upButton", "click", function() {
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
10 questions
Basic Parts of Speech EPS
Quiz
•
9th - 10th Grade
10 questions
Ứng xử trong môi trường số
Quiz
•
10th Grade
10 questions
COMPUTER PROGRAMMING Q2_FLOWCHART (2 points each)
Quiz
•
11th - 12th Grade
9 questions
OCR GCSE CS - 2.1 ERL sorts and searches
Quiz
•
10th - 11th Grade
12 questions
Flowchart Symbols
Quiz
•
11th Grade
11 questions
Threats to Data
Quiz
•
9th - 12th Grade
11 questions
HEALTH AND SAFETY 9
Quiz
•
7th - 9th Grade
15 questions
1.1.1 The structure and function of the processor
Quiz
•
11th Grade - University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
