Library › Coding AI › High school students
Check your Python translation of AP CSP pseudocode
Practice: Catching mistakes and made-up facts. About 5 minutes.
About this exercise
You translated an AP CSP pseudocode procedure into Python and want it checked, not rewritten. Ask for exactly 5 numbered lines, one per Python line in order, each '1. Match - pseudocode line 1' or '2. Mismatch - pseudocode line 2: what's different' with the difference under 15 words. No code blocks and no corrected code, under 90 words.
Common mistakes when you ask AI for this
- Getting a rewrite. The AI's default is to hand you the fixed Python, so you don't learn where it went wrong. Try: Say: "Check it, don't rewrite it. No corrected code."
- Vague verdicts. Without labels, the AI says 'mostly right' and you can't tell which line. Try: Add: "Label each line exactly Match or Mismatch."
- No pointer to the pseudocode. A verdict without the matching pseudocode line is hard to check. Try: Add: "Name the pseudocode line each one matches."
- A long lesson. The AI explains FOR EACH and range() at length. Try: Add: "Exactly 5 numbered lines, one per Python line."
What a strong prompt includes
- Asks for a check, not a rewrite
- Gives exact labels
- Asks for one line each
- Asks for the pseudocode line
- Caps each difference
Related exercises
- Add a cron line that matches the others in a crontab (Coding AI · Product managers)
- Add dark mode by overriding your existing CSS variables (Coding AI · Software developers)
- Add input checks to your number guessing game (Coding AI · High school students)
- Add input validation to a Java method with exact messages (Coding AI · Software developers)
- Add labels to a signup form without rewriting the page (Coding AI · High school students)