Write a procedure with parameters that returns a meaningful value
Explain how a procedure manages complexity through abstraction
Identify which program parts should be extracted into a procedure
Verify a procedure handles expected and edge-case inputs correctly
📈
Exam Impact: Directly tested by the Create Task abstraction rubric row. You must have a procedure with a parameter and explain how it manages complexity.
💡 Why This Matters
You've been calling procedures. Now you write them. Every great program is built from procedures that each do one job well.
Writing a Useful Procedure
A good procedure: has a clear single purpose, uses parameters for input, returns a value, and works for all expected inputs.
A procedure manages complexity by giving a name to a block of code. The caller only needs to know what it does, not how. For the Create Task: (1) define a procedure with a parameter, (2) call it at least once, (3) explain specifically what complexity it hides. Saying 'it keeps code short' does NOT earn the point.
Practice Problems
🔎 Practice MCQ
Which procedure BEST demonstrates managing complexity through abstraction?
⚠️ Predict your answer BEFORE clicking.
🔎 Practice MCQ
A student's Create Task has def check(x): return x > 0. Written response: 'check() makes the program shorter.' Why does this likely NOT earn the abstraction point?
⚠️ Predict your answer BEFORE clicking.
🔎 Practice MCQ
Which change would MOST improve def p(x,y): return x*2+y?
🎮 Game
Procedure Design Challenge
Predict what these procedures return. 8 questions.
0
Correct
1/8
Question
0
Streak 🔥
🤔 Evaluate:
0/8
correct
💻 Python Code Editor
Practice Problems
Write Python and check your answer. Paste into Replit for complex programs.
Problem 1 of 3
Write is_even(n) that returns True if n is even. Print is_even(8). Expected: True
Hint: return n % 2 == 0
Problem 2 of 3
Write max_of_three(a,b,c) that returns the largest. Print max_of_three(4,9,6). Expected: 9
Hint: return max(a, max(b, c))
Problem 3 of 3
Spot the bug: should print True for grade=75 but prints None. def passing(grade): result = grade >= 60
Hint: The function computes result but never returns it. Add: return result
Frequently Asked Questions
Evidence that your procedure hides meaningful logic behind a name. Hiding a single arithmetic operation doesn't count. Hiding a decision, a loop, a compound condition, or a multi-step calculation does. Write your explanation in terms of what the caller doesn't need to know.
Yes. A main() that calls helper procedures each doing one job is well-structured. This demonstrates composition and abstraction.
At least one. The rubric specifies the procedure must take one or more parameters that affect its behavior.
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.