Search Header Logo

Week 5.1

Authored by Poul Nichols

Computers

Professional Development

Used 2+ times

Week 5.1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between a while loop and a do-while

There is no difference

A do-while loop always executes at least once

A while loop always executes at least once

A do-while loop can only be used for counting

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to set up a while loop?

for

while

do

until

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code snippet?

var count = 0; while (count < 5) {

document.write( count + "</br>");

count++; }

0

1

2

3

4

0 1 2 3 4

1 2 3 4 5

1

2

3

4

5

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code snippet?

var i = 0;

do {

document.write(i + "<br>")

i++;

} while (i < 0);

0

0

1

2

3

4

5

An infinite loop

1

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code snippet?

document.write("5" + 5);

5

5

"5" + 5

"55"

10

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code snippet?

document.write(5 + 5);

5

5

"5" + 5

"55"

10

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which logical operator would you use to invert the truth value of a condition?

&&

||

!

==

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?