Library › Coding AI › College students
Check your Big-O answers with exact labels
Practice: Asking for a format you can use. About 5 minutes.
About this exercise
You answered 4 Big-O questions from a past CS 2 exam and want them checked, not re-explained. Ask for exactly 4 numbered lines, one per snippet in order, each in the form 'A: Correct, O(n) - reason' or 'B: Wrong, O(n^2) - reason', where the Big-O is the right answer and the reason is under 12 words. Then one last line in the form 'Score: X/4'. No code blocks and under 90 words in total.
Common mistakes when you ask AI for this
- Getting a lecture. Asked to check, the AI re-teaches Big-O for each snippet in paragraphs and code. Try: Say: "Exactly 4 numbered lines, no code, no explanation beyond a short reason."
- No clear verdict. Without fixed labels, the AI says 'close' or 'partially right'. Try: Add: "Label each Correct or Wrong."
- No score line. You want to know how you'd do on the exam, but the AI won't total it unless asked. Try: Add: "End with one line: Score: X/4."
- Not showing the shape. The AI mixes verdict, answer and reason in a different order on every line. Try: Show it: "Format each like: 2. B: Wrong, O(n^2) - reason under 12 words."
What a strong prompt includes
- Asks for exact labels
- Sets the number of lines
- Shows the line shape
- Caps the reason
- Asks for a score
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)