Search Header Logo
Understanding Code Logic and Output

Understanding Code Logic and Output

Assessment

Flashcard

Computers

9th - 12th Grade

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

8 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What does the following code display? Options: 1 2 3 4 5 6 7 8 9 10, 0 1 2 3 4 5 6 7 8 9, 2 3 4 5 6 7 8 9 10 11, 1 2 3 4 5 6 7 8 9 10 11

Media Image

Back

1 2 3 4 5 6 7 8 9 10

2.

FLASHCARD QUESTION

Front

What does the code segment display?

Media Image

Back

20

3.

FLASHCARD QUESTION

Front

What does the code segment display? Options: r r r b b b r r r b b b, r r r r r r b r r r r r r b, r r r b b b, r r r b r r r b

Media Image

Back

r r r b r r r b

4.

FLASHCARD QUESTION

Front

Which of the following replacements for the will result in an infinite loop? Options: j = 6, j >= 6, j = 7, j > 7

Media Image

Back

j = 6

5.

FLASHCARD QUESTION

Front

If myList = [3, 6, 7, 8], what is myList[1] + myList[3]?

Back

14

6.

FLASHCARD QUESTION

Front

What is the value of myList after this code runs?
myList = [2, 4, 6, 8, 10];
deleteItem(myList, 2);
appendItem(myList, 12);

Back

[2, 4, 8, 10 , 12]

7.

FLASHCARD QUESTION

Front

What is the output of this code?
var x = -1;
while (x != 4) {
x = x + 2;}
console.log(x);

Back

infinite loop

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?