AP CSP 3.10 (Lists)

AP CSP 3.10 (Lists)

9th - 12th Grade

5 Qs

quiz-placeholder

Similar activities

AP CSP Lists

AP CSP Lists

9th - 12th Grade

5 Qs

AP Computer Science Principles

AP Computer Science Principles

9th - 12th Grade

5 Qs

Comp Sci unit 3 #10

Comp Sci unit 3 #10

11th Grade

10 Qs

AP CSP SGO Review

AP CSP SGO Review

9th - 12th Grade

8 Qs

CSE 1.2.4 Quiz

CSE 1.2.4 Quiz

9th - 12th Grade

10 Qs

Conditional statements in python

Conditional statements in python

11th - 12th Grade

10 Qs

Python lists and tuples

Python lists and tuples

12th Grade

10 Qs

Introducción a la Programación - JavaScript

Introducción a la Programación - JavaScript

12th Grade

7 Qs

AP CSP 3.10 (Lists)

AP CSP 3.10 (Lists)

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

Herman Galioulline

Used 136+ times

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

What is displayed as a result of executing the code segment?

1 3 5

5 3 1

100 300 500

500 300 100

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

3

4

9

12

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

count1 = 2, count2 = 2

count1 = 2, count2 = 3

count1 = 3, count2 = 2

count1 = 5, count2 = 0

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Shoppers at a mall were asked whether they preferred wearing gloves or mittens in cold weather. Shoppers’ preferences were stored in the list voteList as strings, with the string "Gloves" representing a preference for gloves and the string "Mittens" representing a preference for mittens.


The following code segment is intended to traverse the list and display the number of shoppers who chose gloves and the number of shoppers who chose mittens.


Which of the following should replace <MISSING CODE> so that the code segment works as intended?

IF(vote ≤ LENGTH(voteList))

FOR EACH vote IN voteList

REPEAT LENGTH(voteList) TIMES

REPEAT UNTIL(vote > LENGTH(voteList))

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

APPEND(evenList, i)

i ← i + 2

i ← i + 2

APPEND(evenList, i)

APPEND(evenList, 2 * i)

i ← i + 1

i ← i + 1

APPEND(evenList, 2 * i)