TEST - Trace table exercise 1

TEST - Trace table exercise 1

11th Grade

10 Qs

quiz-placeholder

Similar activities

Java Unit 10

Java Unit 10

10th - 12th Grade

14 Qs

Computer Science 2: Control Structures

Computer Science 2: Control Structures

8th - 12th Grade

11 Qs

Programming Constructs

Programming Constructs

5th - 11th Grade

10 Qs

AP CSA Unit 4 Review

AP CSA Unit 4 Review

11th Grade

13 Qs

Loops in Java

Loops in Java

9th - 12th Grade

12 Qs

Code.org Unit 5 - Loops

Code.org Unit 5 - Loops

9th - 12th Grade

10 Qs

AP Computer Science Principles Final Project (Unit 6-Loops)

AP Computer Science Principles Final Project (Unit 6-Loops)

9th - 12th Grade

15 Qs

Pseudocode - Iteration

Pseudocode - Iteration

7th - 11th Grade

10 Qs

TEST - Trace table exercise 1

TEST - Trace table exercise 1

Assessment

Quiz

Computers

11th Grade

Hard

Created by

Susana Morton

Used 7+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

In the given code, what does the `print()` statement do?

Prints a blank line

Prints "0"

Moves the cursor to a new line

Ends the program

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How many times will the inner loop execute in the given code?

4

3

12

7

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the purpose of the `next counter2` statement in the code?

To end the program

To increment the counter2 variable

To print "0"

To move to the next line

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the value of `counter1` when the inner loop has completed its first full iteration?

1

2

3

4

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the value of `counter2` after the first iteration of the outer loop?

1

2

3

4

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How many times will the outer loop execute in the given code?

4

3

12

7

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the value of `counter1` after the second iteration of the inner loop?

1

2

3

4

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?