for and while loops level 2

for and while loops level 2

9th - 12th Grade

12 Qs

quiz-placeholder

Similar activities

Scratch

Scratch

KG - Professional Development

10 Qs

Java: repetition control structure for & while

Java: repetition control structure for & while

10th - 12th Grade

10 Qs

Lesson 1 Introduction to Database System

Lesson 1 Introduction to Database System

10th Grade

10 Qs

Week 2 ( Prepare Hand Tools)

Week 2 ( Prepare Hand Tools)

9th Grade

10 Qs

PowerPoint Quiz 2

PowerPoint Quiz 2

9th Grade

13 Qs

Cyber Security KS4

Cyber Security KS4

8th - 12th Grade

15 Qs

Alapismeretek

Alapismeretek

7th - 12th Grade

10 Qs

WJEC GCSE ICT Unit 1 E-Mail

WJEC GCSE ICT Unit 1 E-Mail

9th - 10th Grade

13 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

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Already have an account?