Big Idea 3: Algorithms and Programming · Topic 3.14 · Coding Practice
Libraries — Code It Yourself
Write real code and check it against the expected output. Pick Python or JavaScript; the AP pseudocode reference is there when you need it.
You read the GradeKit API doc on paper in the Read the GradeKit Doc and Pick the Library exercises. Now use the real library: GradeKit is already written for you at the top of each problem — do NOT rewrite it, just CALL its procedures. The problems get harder as you go, ending with a grade report you build from scratch. Predict the output first, then run it.
Problem 1 of 4
GradeKit is provided for you. Call its Average procedure on the list [80, 90, 100] and print the class average. Do NOT rewrite the averaging logic yourself.
The doc says Average(scores) returns the average rounded down to a whole number. You do not write the math — just pass the list to Average and print what it returns. (80 + 90 + 100) / 3 = 90.
Problem 2 of 4
Using the provided GradeKit, print the highest score in [72, 95, 88] on the first line. Then, on the second line, print PASS if that top score meets a cutoff of 90 (use Passing), otherwise FAIL.
Highest([72, 95, 88]) returns 95. Then Passing(95, 90) checks 95 ≥ 90, which is true — so print PASS. Print the boolean as PASS/FAIL with an if-statement; do not print the raw true/false.
Problem 3 of 4
A student scored 68. Using the provided GradeKit, first Curve their score by 5 points and print the curved score. Then print PASS or FAIL for the curved score against a cutoff of 70 (use Passing). Watch the documented parameter order.
Curve(68, 5) returns 68 + 5 = 73 (below the 100 cap). Then Passing(curved, 70) must be called in the order (score, cutoff): Passing(73, 70) checks 73 ≥ 70 → true → PASS.
Problem 4 of 4
Build a grade report from scratch using ONLY the provided GradeKit procedures. For the list [55, 91, 78, 64], print three lines: (1) the average, (2) the highest score, and (3) PASS if the average meets a cutoff of 70, otherwise FAIL.
Average([55, 91, 78, 64]) = 288 // 4 = 72. Highest is 91. Passing(72, 70) checks 72 ≥ 70 → true → PASS. Call each GradeKit procedure once and print its result on its own line; never reimplement them.
Your code runs on a secure external service. Answers are checked automatically — nothing is stored.
Get in Touch
Whether you're a student, parent, or teacher — I'd love to hear from you.
Just want free AP CS resources?
Enter your email below and check the subscribe box — no message needed.
Students get daily practice questions and study tips. Teachers get curriculum resources and teaching strategies.
Typically responds within 24 hours
✓
Message Sent!
Thanks for reaching out. I'll get back to you within 24 hours.