• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 30 pages
Exam (elaborations)

AP Computer Science Principles Programming (Khan Academy) 2026 | Study Guide, Practice Questions, Answers, Rationales & Exam Review

Document preview thumbnail
Preview 3 out of 30 pages

Prepare for AP Computer Science Principles Programming with focused study material covering programming fundamentals, algorithms, variables, data, Boolean logic, functions, loops, computational thinking, and problem-solving concepts. Includes practice questions, answers, and rationales to reinforce essential programming skills and support effective AP CSP revision, exam preparation, and review.

Content preview

AP Computer Science
Principles Programming
(Khan Academy) 2026 |
Study Guide, Practice
Questions, Answers,
Rationales & Exam Review
| Complete Ethics Study
Guide




Updated 2026 Questions and Answers
100% Verified Exam Prep and Comprehensive
Rationales

,Included

, Which of the following is a benefit of procedures for Programmers can more easily understand programs with procedures, since
programmers? procedures give names to complex pieces of code.



Aarush is writing a program to help him calculate how 500
much exercise he does at the gym.
The procedure calcSwimYards returns the number of yards
swum for a given number of laps in a pool of a given
length.
PROCEDURE calcSwimYards(poolLength, numLaps)
{
lapLength ← poolLength * 2
RETURN lapLength * numLaps
}
Aarush then runs this line of code:
yardsSwum ← calcSwimYards(25, 10)
What value is stored in yardsSwum?


At that distance, the code should give the player a 30% RANDOM(1, 100) <= 30
chance of making the goal.
RANDOM(1, 10) <= 3




discount ← 0 ≥

IF (quantity <?> 150)
{
discount ← 10
} ELSE
{
IF (quantity <?> 75)
{
discount ← 7
}
ELSE {
IF (quantity <?> 10)
{
discount ← 5
}
}
}
Which operator could replace <?> so that the code snippet
works as expected?


IF (ironLevel < 10) 4.5 "anemic"
{ 8.2 "anemic"
diagnosis ← "anemic" 9.9 "anemic"
} 10.0 "normal"
ELSE 22.5 "normal"
{
diagnosis ← "normal"
}
Which of these tables shows the expected values of
diagnosis for the given values of ironLevel?
Choose 1 answer:

Document information

Uploaded on
September 8, 2026
Number of pages
30
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$10.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Docmaster20
4.3
(6)
Sold
33
Followers
2
Items
2733
Last sold
10 hours ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions