Intro to Java Loops

Intro to Java Loops

Assessment

Flashcard

Computers

9th - 12th Grade

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

15 questions

Show all answers

1.

FLASHCARD QUESTION

Front

Why are loops used in programming?

Back

To run blocks of code repeatedly.

2.

FLASHCARD QUESTION

Front

Each time through a loop is called a(n) ______________.

Back

iteration

3.

FLASHCARD QUESTION

Front

What is the final value of x?
int x = 0;
while (x < 5)
x++;

Back

5

4.

FLASHCARD QUESTION

Front

What is the final value of x? int x = 4; while (x <= 5) x++;

Back

6

5.

FLASHCARD QUESTION

Front

What is the final value of x?
int x = 3;
while (x > 5)
x++;

Back

3

6.

FLASHCARD QUESTION

Front

What is the final value of x?
int x = 0;
for(int i = 1; i < 8; i += 3)
x += i;

Back

12

7.

FLASHCARD QUESTION

Front

What is the final value of x?
int x = 0;
for(int i = 5; i > 0; i --)
x ++;

Back

5

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?