mples
nce Principles
from
APthe
Computer
-2023
Student
Exam.pdf~~~!!!!!!!!!!!!!!!!!!!!!!!!!!@#!#@@@@@@@@@@@@@@@@@@@!!!!!!!!!!!!!!!!!!!!!!@@@@@@@@@@@@@@@@@@@@
Science
Samples
Principles
from the -2023StudentExam.pdf~~~!!!!!!!!!!!!!!!!!!!!!!!!!!@#!#@@@@@@@@@@@@@@@@@@@!!!!!!!!!!!!!!!!!!!!!!@@@@@@@@@@@@
Samples from the 2023 Exam.pdf~~AP Computer Science Principles - Student Samples from the 2023 Exam.pdf~~~
3. WRITTEN RESPONSES Create Sample A 1 of 3
3 a.
3.a.i.
The purpose of the program is to entertain and to educate students by deepening knowledge of projectiles through an
accurate physics simulation.
3.a.ii.
A realistic projectile simulation is displayed based on user inputs changing the initial angle and velocity. The projectile
shoots across the screen, and after it goes off the screen, dots trace in with density showing speed. The entire
simulation works to increase knowledge of projectile motion.
3.a.iii.
The user inputs the up and down arrow to increase or decrease the initial angle by 15 degrees each press respectively.
The user can also input the right and left arrow to increase or decrease the starting velocity respectively. When the angle
and velocity are where desired the user can input the enter button to run the simulation. Upon pressing enter, an output of
a black ball animates across the screen with accurate motion; once the ball is off the screen, the program outputs dotted
lines with density of lines showing speed. The user can then input the space bar to clear the screen and reset.
3 b.
3.b.i.
3.b.ii.
3.b.iii.
positions
3.b.iv.
It represents a list of tuples with each tuple representing the position the projectile has been at each frame. All together
the list represents every position the object has been at this run.
3.b.v.
The program utilizes the list by iterating over the list and drawing a dot at the position tuple provided by every fourth index.
This is produced by only drawing a dot when the index modulo 4 is zero. The program only draws the dots once the
object is off the screen, so a list is used to store positions so they can be accessed once the object is off screen.
Without a list it would not be able to iterate over the list drawing a dot at every fourth element in the list once the object is
off the screen. Instead, without a list, the program would have to somehow create a new variable for each tuple at each
frame and create new variables in real time while figuring out how to wait and draw a dot at each of these; this would be
extremely complex and messy if possible.
mples
nce Principles
from
APthe
Computer
-2023
Student
Exam.pdf~~~!!!!!!!!!!!!!!!!!!!!!!!!!!@#!#@@@@@@@@@@@@@@@@@@@!!!!!!!!!!!!!!!!!!!!!!@@@@@@@@@@@@@@@@@@@@
Science
Samples
Principles
from the -2023StudentExam.pdf~~~!!!!!!!!!!!!!!!!!!!!!!!!!!@#!#@@@@@@@@@@@@@@@@@@@!!!!!!!!!!!!!!!!!!!!!!@@@@@@@@@@@@
Samples from the 2023 Exam.pdf~~~!!!!!!!!!!!!!!!!!!!!!!!!!!@#!#@@@@@@@@@@@@@@@@@@@!!!!!!!!!!!!!!!!!!!!!!
nce Principles
from
APthe
Computer
-2023
Student
Exam.pdf~~~!!!!!!!!!!!!!!!!!!!!!!!!!!@#!#@@@@@@@@@@@@@@@@@@@!!!!!!!!!!!!!!!!!!!!!!@@@@@@@@@@@@@@@@@@@@
Science
Samples
Principles
from the -2023StudentExam.pdf~~~!!!!!!!!!!!!!!!!!!!!!!!!!!@#!#@@@@@@@@@@@@@@@@@@@!!!!!!!!!!!!!!!!!!!!!!@@@@@@@@@@@@
Samples from the 2023 Exam.pdf~~AP Computer Science Principles - Student Samples from the 2023 Exam.pdf~~~
3. WRITTEN RESPONSES Create Sample A 1 of 3
3 a.
3.a.i.
The purpose of the program is to entertain and to educate students by deepening knowledge of projectiles through an
accurate physics simulation.
3.a.ii.
A realistic projectile simulation is displayed based on user inputs changing the initial angle and velocity. The projectile
shoots across the screen, and after it goes off the screen, dots trace in with density showing speed. The entire
simulation works to increase knowledge of projectile motion.
3.a.iii.
The user inputs the up and down arrow to increase or decrease the initial angle by 15 degrees each press respectively.
The user can also input the right and left arrow to increase or decrease the starting velocity respectively. When the angle
and velocity are where desired the user can input the enter button to run the simulation. Upon pressing enter, an output of
a black ball animates across the screen with accurate motion; once the ball is off the screen, the program outputs dotted
lines with density of lines showing speed. The user can then input the space bar to clear the screen and reset.
3 b.
3.b.i.
3.b.ii.
3.b.iii.
positions
3.b.iv.
It represents a list of tuples with each tuple representing the position the projectile has been at each frame. All together
the list represents every position the object has been at this run.
3.b.v.
The program utilizes the list by iterating over the list and drawing a dot at the position tuple provided by every fourth index.
This is produced by only drawing a dot when the index modulo 4 is zero. The program only draws the dots once the
object is off the screen, so a list is used to store positions so they can be accessed once the object is off screen.
Without a list it would not be able to iterate over the list drawing a dot at every fourth element in the list once the object is
off the screen. Instead, without a list, the program would have to somehow create a new variable for each tuple at each
frame and create new variables in real time while figuring out how to wait and draw a dot at each of these; this would be
extremely complex and messy if possible.
mples
nce Principles
from
APthe
Computer
-2023
Student
Exam.pdf~~~!!!!!!!!!!!!!!!!!!!!!!!!!!@#!#@@@@@@@@@@@@@@@@@@@!!!!!!!!!!!!!!!!!!!!!!@@@@@@@@@@@@@@@@@@@@
Science
Samples
Principles
from the -2023StudentExam.pdf~~~!!!!!!!!!!!!!!!!!!!!!!!!!!@#!#@@@@@@@@@@@@@@@@@@@!!!!!!!!!!!!!!!!!!!!!!@@@@@@@@@@@@
Samples from the 2023 Exam.pdf~~~!!!!!!!!!!!!!!!!!!!!!!!!!!@#!#@@@@@@@@@@@@@@@@@@@!!!!!!!!!!!!!!!!!!!!!!