AP CSP Practice Test 1 (1)

AP CSP Practice Test 1 (1)

7th - 9th Grade

20 Qs

quiz-placeholder

Similar activities

JPI L6 Q1

JPI L6 Q1

7th Grade

15 Qs

Computer

Computer

4th - 7th Grade

20 Qs

BIM1014 Quiz 2

BIM1014 Quiz 2

KG - University

15 Qs

Acceptable Use Policy

Acceptable Use Policy

6th - 9th Grade

16 Qs

Semester 1- Exploration of Robotics (Units 5-7)

Semester 1- Exploration of Robotics (Units 5-7)

6th - 8th Grade

17 Qs

9.1 Homework #3

9.1 Homework #3

9th Grade

20 Qs

B Words GCSE Computer Science

B Words GCSE Computer Science

1st - 10th Grade

15 Qs

computer Lab Manners

computer Lab Manners

5th - 10th Grade

19 Qs

AP CSP Practice Test 1 (1)

AP CSP Practice Test 1 (1)

Assessment

Quiz

Computers

7th - 9th Grade

Practice Problem

Medium

Created by

Quốc Thư

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

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

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Media Image

Consider the following code.

What is displayed because of executing the code segment?

1 3 5 7 9

1 5 7

3 9

9

Answer explanation

Media Image

2.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Media Image

Consider the following code segment.

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

Dog Cat Fish Golden Bandicoot

Dog Cat Fish

Dog Golden Bandicoot Cat Fish

Golden Bandicoot Cat Fish

Answer explanation

petList is initialized containing the value Dog

petList[Dog]

- The value Cat is added to the end of petList

- petList[Dog Cat]

- The value Fish is added to the end of petList

- petList[Dog Cat Fish]

The value Golden Bandicoot is added at position 2 of petList and shifts all values after position 2 to the right.

- petList [Dog Golden Bandicoot Cat Fish]

- The value in position 1 of petList is removed, and all values to the right of position 1 are shifted to the left: petList[Golden Bandicoot Cat Fish]

Each item in petList is displayed, resulting in [Golden Bandicoot Cat Fish].

3.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Media Image

Students at a high school receive letter grades based on the following scale:

Scores - Grades letter

I only

III only

I and II only

I, II and III

Answer explanation

Media Image

4.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Colors can be represented by decimal values from 0 to 255. If each pixel in a photo is a combination of three color values, what is the minimum number of bits needed to store a single pixel?

512

256

24

8

Answer explanation

Determine the minimum number of bits to hold the number 254:

254 − 128 = 126

  126 − 64 = 62

    64 − 32 = 30

    30 − 16 = 14

      14 − 8 = 6

        6 − 4 = 2

        2 − 2 = 0

11111110

It takes 8 bits to hold the number 255.

Three colors would require 8 bits × 3 = 24 bits.

5.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Which of the following is a true statement about data transmitted over the internet?

All data traveling over the internet is binary.

Packets are received in the same order that they are sent.

Redundancy in the design of the internet is overseen by large companies that set the standards used.

The domain name system (DNS) has been challenged by the Digital Millennium Copyright Act (DMCA).

Answer explanation

The internet uses fiber-optic cables that transmit data as “on” or “off,” which is represented in binary as 0 or 1.

(B)Due to the fault-tolerant nature of the internet, packets travel in different directions through the internet. Since packets travel in different directions, they arrive at their destination in a different order than that in which they were sent.

(C)There is no central governing body that controls the design of the internet.

(D)The Digital Millennium Copyright Act does not relate to the internet naming convention.

6.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Media Image

What will the following code segment display?

1 4 7 10 9

10

9 10 7 4 1

Nothing will be displayed due to the error index out of bounds.

Answer explanation

The procedure is trying to access index 0. The language used on this AP exam starts on index 1. So 0 is out of bounds and will result in an error.

7.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Media Image

What should replace <missing condition> so that the program below displays TRUE 60% of the time?

x < 6

x >= 6

x > 10

x £ 10

Answer explanation

There are ten numbers between 5 and 14 inclusive: 5, 6, 7, 8, 9, 10, 11, 12, 13, 14. For the condition to evaluate to true 60% of the time, six of the ten numbers must be included: 5, 6, 7, 8, 9, 10. Since x £ 10 would include six numbers, it would result in being true 60% of the time

(A)x < 6 would include only one number and would result in being true 10% of the time.

(B)x ≥ 6 would include nine numbers and would result in being true 90% of the time.

(C)x > 10 would include four numbers and would result in being true 40% of the time.

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?