for and while loops level 2

for and while loops level 2

9th - 12th Grade

12 Qs

quiz-placeholder

Similar activities

CMD - Windows

CMD - Windows

12th Grade

17 Qs

Fashion Merchandising 1.01

Fashion Merchandising 1.01

9th - 12th Grade

10 Qs

Virtual Memory

Virtual Memory

11th Grade

10 Qs

Tin học 2

Tin học 2

11th Grade

12 Qs

Programming Vocabulary

Programming Vocabulary

10th - 12th Grade

17 Qs

Technology in medicine

Technology in medicine

10th Grade

15 Qs

KIỂM TRA TX TIN HỌC 11

KIỂM TRA TX TIN HỌC 11

9th Grade

10 Qs

for and while loops level 2

for and while loops level 2

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

Brian Miller

Used 6+ times

FREE Resource

12 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

The x variable in the FOR LOOP starts at what value

2.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

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

3.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

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

4.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

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

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

The variable s is initialized before the FOR LOOP starts and is incremented in the loop. What LINE in the given code INITIALIZES s?

int s = 0;

for(int x=0; x<=30; x=x+10){

s=s+x;

System.out.println(x+" "+s);

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

The variable s is initialized before the FOR LOOP starts and is incremented in the loop. What LINE in the given code INCREMENTS s?

int s= 0;

for(int x=0; x<=30; x=x+10){

s=s+x;

System.out.println(x+" "+s);

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What is the FIRST line of the output produced by this code?

0 10

0 0

x s

10 30

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?