for and while loops level 2

for and while loops level 2

Assessment

Flashcard

Computers

9th - 12th Grade

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

11 questions

Show all answers

1.

FLASHCARD QUESTION

Front

The x variable in the FOR LOOP starts at what value?

Back

0

2.

FLASHCARD QUESTION

Front

The x variable in the FOR LOOP ends at what value?

Back

30

3.

FLASHCARD QUESTION

Front

The x variable in the FOR LOOP increments by how much after each iteration of the loop?

Back

10

4.

FLASHCARD QUESTION

Front

The variable s is initialized before the FOR LOOP starts. What value is the starting value for s?

Back

0

5.

FLASHCARD QUESTION

Front

What LINE in the given code INITIALIZES s?

Back

int s = 0;

6.

FLASHCARD QUESTION

Front

What LINE in the given code INCREMENTS s? Options: int s= 0;, for(int x=0; x<=30; x=x+10){, s=s+x;, System.out.println(x+" "+s);

Back

s=s+x;

7.

FLASHCARD QUESTION

Front

What is the FIRST line of the output produced by this code? Options: 0 10, 0 0, x s, 10 30

Back

0 0

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?