AP Computer Science Principles · Unit practice

AP Computer Science Principles Big Idea 4: practice questions

5 exam-style questions with answers and explanations. Answer them on FiveStudy to keep a streak and see your AP® score estimate.

Question 1

A student sets up several devices that exchange data at home. Which of the following describes what the student has built?

  • A. A group of connected computing devices that can exchange data
  • B. A single computer that runs more than one program at the same time
  • C. A program that protects a computer from unwanted messages
  • D. A cable that carries electricity to a computing device

Answer: A group of connected computing devices that can exchange data

A network is devices plus connections for communication. Multitasking, protective software, and power cables are different things.

Question 2

The figure shows a small network. Each circle is a device, and each line is a direct connection.

A message can travel from device A to device D along more than one route. How many distinct paths from A to D does the network provide?

  • A. 1
  • B. 2
  • C. 3
  • D. 4

Answer: 2

The two paths are A-B-D and A-C-D. Devices B and C are not connected to each other, so no third route exists.

Question 3

A help desk measures two connections by sending the same files at each connection's full bandwidth. Connection P sends a 300-megabit file in 5 seconds. Connection Q sends a 150-megabit file in 10 seconds.

Based on these measurements, which connection has the higher bandwidth, and why?

  • A. Connection Q, because it was given the smaller file to send
  • B. Connection P, because it finished its transfer in fewer seconds than connection Q
  • C. Connection P, because it moves 60 megabits per second while connection Q moves 15
  • D. The connections have equal bandwidth, because each one sent a file at its full rate

Answer: Connection P, because it moves 60 megabits per second while connection Q moves 15

Bandwidth is the amount of data a connection can move in a fixed amount of time, so it is the file size divided by the transfer time. Connection P moves 300 / 5 = 60 megabits per second, and connection Q moves 150 / 10 = 15 megabits per second, so connection P has the higher bandwidth because it moves 60 megabits per second against Q's 15. Saying connection Q wins because it was given the smaller file confuses the size of one test file with the rate the connection can sustain; a smaller file does not raise capacity. Saying connection P wins only because it finished in fewer seconds ignores that the files differ in size, so raw finish time alone does not settle the comparison. Saying the connections are equal because each sent a file at full rate overlooks that full rate itself differs: 60 against 15 megabits per second.

Question 4

A 200-megabit file is downloaded over a connection with a bandwidth of 50 megabits per second. If the connection transfers at its full bandwidth, about how long does the download take?

  • A. 10 seconds
  • B. 50 seconds
  • C. 250 seconds
  • D. 4 seconds

Answer: 4 seconds

Time is data divided by bandwidth: 200 megabits at 50 megabits per second is 4 seconds. The other values come from misusing the two numbers.

Question 5

A home network connects a laptop, a phone, and a printer through one router so they can share files. Which of the following best identifies the computing system in this description?

  • A. The connected devices and the software that lets them work together
  • B. The electricity that powers the router and the printer
  • C. The desk and the shelves on which the devices are placed
  • D. The owner's overall impression of how fast the devices feel

Answer: The connected devices and the software that lets them work together

A computing system is a group of devices and software functioning together. Power, furniture, and impressions are not parts of a computing system.

More AP Computer Science Principles practice

Other units