Search Header Logo

Computing 3.13-3.17

Authored by Angus Macaulay

Computers

9th - 12th Grade

Used 18+ times

Computing 3.13-3.17
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

5 mins • 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

2.

MULTIPLE CHOICE QUESTION

5 mins • 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

}

3.

MULTIPLE CHOICE QUESTION

5 mins • 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

4.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Which of the below are examples of control structures?

1 - if

2 - if/else

3 - while

4 - for

1 only

1 and 2 only

3 and 1 only

1, 2, 3, and 4

5.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

You need to write a program that has Karel move 6 times and then put a ball. Which control structure do you use?

For loop

While Loop

If Statement

If/Else Statement

None of these

6.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

You need to write a program that has Karel take all the tennis balls where Karel is standing if there are any there.


Karel should end up with no tennis balls on that spot.


What control structure do you need to use?

For Loop

While Loop

If Statement

If/Else Statement

None of these

7.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

You need to write a program that has Karel put down a tennis ball if the world has dimensions of 1x1.


What control structure do you 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?