Library › Coding AI › Teachers

Fix a class average formula that punishes excused work

Practice: Catching mistakes and made-up facts. About 5 minutes.

About this exercise

A co-teacher's average formula gives excused students low grades. Give a fixed formula for I2 (filled down) in one code block that skips EX marks and blank cells instead of counting them as zeros, shows the text No grades when a student has no scores yet, and rounds to 1 decimal. Then write exactly 1 numbered line starting Problem: under 20 words. Under 35 words outside the code.

Common mistakes when you ask AI for this

  • Accepting a quick patch. The AI may wrap it in IFERROR and keep dividing by 6. Try: Add: "Skip EX and blanks instead of counting them as zeros."
  • Forgetting new students. A student with no scores shows an error or 0. Try: Add: "Show No grades when there are no scores yet."
  • Leaving rounding out. Parents see averages like 84.333333. Try: Add: "Round to 1 decimal."
  • Not limiting the reason. The AI writes paragraphs about SUM versus AVERAGE. Try: Add: "Then exactly 1 numbered line starting Problem:, under 20 words."
  • Getting a menu of options. The AI likes to offer two or three versions of the formula, so you're left to pick and test them yourself. Try: Add: "Give one formula only, in one code block, no alternatives."

What a strong prompt includes

  • Skips EX and blanks
  • Handles new students
  • Asks for rounding
  • Asks for one reason line
  • Asks for one answer only

Practice this now ↑

Related exercises