Unit 5 Lists, Loops, & Traversals

Unit 5 Lists, Loops, & Traversals

10th - 12th Grade

12 Qs

quiz-placeholder

Similar activities

Unit 5 Study Guide

Unit 5 Study Guide

9th - 12th Grade

15 Qs

Unit 7- Lesson 11: Assessment Day

Unit 7- Lesson 11: Assessment Day

9th - 12th Grade

15 Qs

AP CSP - Code.org Unit 3 Review

AP CSP - Code.org Unit 3 Review

9th - 12th Grade

15 Qs

CSI: Spring Final

CSI: Spring Final

9th - 12th Grade

14 Qs

CSP Lists Loops and Traversals

CSP Lists Loops and Traversals

10th - 12th Grade

15 Qs

Lists, Loops & Traversals

Lists, Loops & Traversals

10th - 12th Grade

15 Qs

Code.org Unit 3 Review

Code.org Unit 3 Review

9th - 12th Grade

8 Qs

Comp Sci Unit 3.b

Comp Sci Unit 3.b

11th Grade

15 Qs

Unit 5 Lists, Loops, & Traversals

Unit 5 Lists, Loops, & Traversals

Assessment

Quiz

Computers

10th - 12th Grade

Medium

Created by

Kaitlin McKiernan

Used 186+ times

FREE Resource

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Which of the following will result in ONLY all the items in list being printed to the console if placed where the program reads <INSERT CODE> and the program is run?

i < list[list.length]

i < list.length

i < list[0]

i < list[1]

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

wordList is a list of words that currently contains the values ["tree", "rock", "air"]

Which of the following lines will result in the list containing the values ["air", "rock", "air"] ?

wordList[0] = wordList[2]

wordList[2] = wordList[0]

insertItem(wordList, 0, "air")

removeItem(wordList, 0)

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will be displayed in the console when this program runs?

2

3

20

30

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will be displayed when this program finishes running?

3

6

7

5

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will be displayed in the console when the following program runs?

0 2 4 6

0 2 4

2 4 6

The program will result in an infinite loop.

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will the following program display in the console?

0 1 2 3

0 1 2 3 4

1 2 3

1 2 3 4

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will the following program display in the console?

0

5

10

15

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?