If-Statements

If-Statements

9th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

OOP 1 Undiksha

OOP 1 Undiksha

12th Grade - University

13 Qs

Empowerment Technologies Quiz 2

Empowerment Technologies Quiz 2

11th Grade

10 Qs

Chapter 3 Exploring Linux Filesystems

Chapter 3 Exploring Linux Filesystems

11th Grade - University

10 Qs

IP ADDRESSING AND ITS VERSION

IP ADDRESSING AND ITS VERSION

11th Grade

15 Qs

Networks and Internet

Networks and Internet

10th Grade

10 Qs

8525 AQA GCSE  3.1.1 Pseudo-code

8525 AQA GCSE 3.1.1 Pseudo-code

10th - 11th Grade

14 Qs

After Effect Intoduction

After Effect Intoduction

10th Grade - University

15 Qs

Inspire - AI Trivia

Inspire - AI Trivia

11th Grade

10 Qs

If-Statements

If-Statements

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

Rashad Davis

Used 26+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Media Image

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

Media Image

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

Media Image

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

Media Image

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

Media Image

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

Media Image

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?

Discover more resources for Computers