Loops Quiz

Loops Quiz

11th Grade

22 Qs

quiz-placeholder

Similar activities

Basic Python Coding

Basic Python Coding

9th - 12th Grade

20 Qs

การเขียนโปรแกรมภาษา python ม.5 ภาคเรียนที่ 2 ปีการศึกษา 2561

การเขียนโปรแกรมภาษา python ม.5 ภาคเรียนที่ 2 ปีการศึกษา 2561

10th - 12th Grade

20 Qs

Validating user input

Validating user input

11th Grade

20 Qs

APCSA Arrays

APCSA Arrays

9th - 12th Grade

20 Qs

Phyton-Midterm

Phyton-Midterm

11th Grade

20 Qs

Python тілінде циклдар

Python тілінде циклдар

9th - 12th Grade

22 Qs

Синтаксис Python

Синтаксис Python

7th - 11th Grade

21 Qs

Python_2R

Python_2R

KG - Professional Development

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?