If-Statements

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Rashad Davis
Used 26+ times
FREE Resource
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
Similar Resources on Wayground
10 questions
Word Processing

Quiz
•
KG - 9th Grade
10 questions
Basic Parts of a Computer

Quiz
•
10th - 12th Grade
7 questions
7. Mobile Control LED

Quiz
•
1st - 10th Grade
9 questions
Lesson 3- Main Parts of a Computer

Quiz
•
7th - 12th Grade
15 questions
N4 Theory - 2

Quiz
•
12th Grade - University
15 questions
soal ms word,excel,power point

Quiz
•
9th - 12th Grade
15 questions
QUIZ 1

Quiz
•
9th Grade
14 questions
Identifying and Understanding the Microsoft Word Interface

Quiz
•
8th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Analog vs Digital

Quiz
•
9th - 12th Grade
10 questions
CTEA Computer Vocab Terms #1

Quiz
•
12th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade