Simulations (College Board AP® Computer Science Principles): Exam Questions

9 mins9 questions
1
1 point

A city transport team builds a simulation of a busy intersection to find the best traffic-light timings.

Which of the following is the main advantage of using the simulation rather than testing each light timing at the real intersection?

  • It lets many timings be tested quickly without disrupting real traffic

  • It shows exactly how the real junction will behave at busy times

  • It avoids the need to collect any traffic data beforehand

  • It makes the chosen timings work equally well at other junctions

2
1 point

A city transport team builds a simulation of a busy intersection to find the best traffic-light timings. The simulation ignores weather, road construction, and individual driver behavior.

Which of the following best describes this design decision?

  • abstraction — modeling only the features relevant to the purpose

  • iteration — repeating the simulation many times

  • an infinite loop

  • a syntax error in the simulation

3
1 point

A city transport team builds a simulation of a busy intersection to find the best traffic-light timings.

The team runs the simulation thousands of times. Which statement is correct?

  • Running it more times cannot fix inaccurate assumptions built into the model

  • Running it more times guarantees the results exactly match reality

  • More runs remove the need for the model to be accurate

  • More runs remove the variability introduced by RANDOM

4
1 point

Which of the following best describes a computer simulation?

  • A program that stores large amounts of data in a structured, searchable form

  • A program that connects multiple computers together so they can share resources

  • A program that models a real-world object or process using simplified representations

  • A program that translates high-level source code into machine code

5
1 point

A car manufacturer uses a computer simulation to model how a new vehicle behaves in a collision. What is the main advantage of using a simulation instead of crashing real vehicles?

  • It guarantees the real car will never be damaged in an actual crash

  • It removes the need to ever build a physical car

  • It proves that the car is completely safe in every possible collision

  • It lets engineers test many collision scenarios without the cost and danger of wrecking real vehicles

6
1 point

A researcher builds a simulation of how a disease spreads through a population and uses RANDOM to decide whether each contact between two people results in an infection.

Why is RANDOM used in this simulation?

  • To make the simulation run faster than a real experiment would

  • To model the unpredictable, variable nature of real-world infection so repeated runs show a range of outcomes

  • To guarantee that the same outcome occurs every time the simulation is run

  • To remove the need for any assumptions in the model

7
1 point

A flight-training simulation models an aircraft's controls and instruments but does not model rare mechanical failures such as an engine part breaking mid-flight.

Which statement best describes this?

  • The simulation is a simplified model and cannot capture every real-world detail

  • The simulation contains a syntax error that prevents failures from being modeled

  • The simulation will produce exactly the same outcome as a real flight

  • The simulation is useless because it does not model every possible event

8
1 point

An election-prediction simulation is built using survey data collected only from voters in a single city. The simulation is then run millions of times.

Which statement is correct?

  • Running the simulation millions of times will correct the unrepresentative data

  • The results will be biased because the underlying data does not represent the whole population, no matter how many times it runs

  • The simulation must be accurate because it uses RANDOM values

  • The large number of runs guarantees that the prediction is accurate

9
1 point

Two teams model the same ecosystem. Team X runs a very simple model 10,000 times, while Team Y runs a model that includes more of the relevant real-world variables but runs it only 100 times.

Whose results are more likely to be representative of the real ecosystem, and why?

  • Team Y, because including more of the relevant real-world variables makes the model more accurate, even with fewer runs

  • Team X, because running a simulation more times always makes the results more representative

  • Team X, because a simpler model is always closer to how the real ecosystem behaves

  • Team Y, because a model that runs fewer times is automatically more reliable