Loops Quiz

Loops Quiz

11th Grade

22 Qs

quiz-placeholder

Similar activities

Programming

Programming

9th - 11th Grade

20 Qs

Java For Loop basic syntax

Java For Loop basic syntax

9th - 12th Grade

20 Qs

Computer 10 | Introduction to Java

Computer 10 | Introduction to Java

9th - 12th Grade

20 Qs

Loops

Loops

10th - 12th Grade

17 Qs

python - Launch Lesson

python - Launch Lesson

7th - 12th Grade

22 Qs

For and While Loop in Python

For and While Loop in Python

9th - 12th Grade

18 Qs

SAD 1

SAD 1

9th - 12th Grade

20 Qs

Variables and Loops Review

Variables and Loops Review

9th - 12th Grade

20 Qs

Loops Quiz

Loops Quiz

Assessment

Quiz

Computers

11th Grade

Hard

Created by

Garrett Baltzer

FREE Resource

22 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A while loop has the following format:

while (condition)

{

...

}

while

{

...

}

continue while (condition)

{

...

}

while [condition]

[

...;

]

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A while loop carries on as long as...

The condition in the brackets is true

The condition in the brackets is false

i < 10

the for loop has not ended

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

OUTPUT?

int i = 1;

while (i < 5) {

System.out.println("Hello");

i++;

}

Hello

Hello

Hello

Hello

Hello

Hello

Hello

Hello

Hello

Hello

Hello

Hello

Hello

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How many stars are printed?

7

3

4

5

Infinite Loop

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

In total, how many times is the inner loop executed?

5

10

15

50

Infinite Loop

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What does the following code print?

A rectangle of 9 rows with 5 stars per row

A rectangle of 6 rows with 6 stars per row

A rectangle of 7 rows with 5 stars per row

A rectangle of 7 rows with 6 stars per row

Infinite Loop

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

True/False
If a loop condition is never satisfied then the loop does not execute.
True
False

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?