Search Header Logo

Karel Quizzes 11-15 (If/Else- Indent)

Authored by Fernando Alvarado

Computers

9th - 12th Grade

Used 30+ times

Karel Quizzes 11-15 (If/Else- Indent)
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why do we use if/else statements in JavaScript?

To repeat something for a fixed number of times

To either do something if a condition is true or do something else

To break out of some block of code

To repeat something while a condition is true

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does an if/else statement look like in JavaScript?

if (condition) {

//code

}

for (var i = 0; i < count; i++) {

//code

}

if (condition) {

//code

}

if (condition) {

//code

}

if (condition) {

//code

} else {

//code

}

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why do we use while loops in JavaScript?

To break out of some block of code

To do something if a condition is true

To repeat some code while a condition is true

To repeat something for a fixed number of times

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which general while loop definition is written correctly?

while (x is true) {

// code

}

if (i<5) {

//code

}

while (var i = 0; i < count; i++) {

//code

}

while (condition) {

//code

}

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What do we use control structures for in JavaScript?

Control the flow of the program; how the commands execute.

Start our JavaScript program

Store information for later

Teach Karel new commands

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the below are examples of control structures?


(I) if

(II) if/else

(III) while

(IV) for

I only

I and II only

III and I only

I, II, III, and IV

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

You need to write a program that has Karel move 6 times and then put a ball.

Which control structure do you need to use?

For loop

While Loop

If Statement

If/Else statement

None of these

Access all questions and much more by creating a free account

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

Already have an account?