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

9 mins9 questions
1
1 point

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

  • It lets the team try many timings quickly and cheaply without disrupting real traffic

  • It guarantees the chosen timing will be perfect in the real world

  • It removes the need to ever change the real traffic lights

  • It proves that traffic jams can never occur

2
1 point

The simulation ignores weather, road works, and individual driver behaviour. This is best described as an example of:

  • abstraction — modelling 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

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 make the simulation stop using 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 modelled

  • 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.

Which factor is most likely to make a simulation's results more representative of the real world?

  • Including the relevant real-world variables and accurate assumptions in the model

  • Simply increasing the number of times the simulation is run

  • Removing all use of RANDOM from the simulation

  • Making the program's code shorter so that it runs faster