Library › Data AI › Teachers

Count school days late, skipping weekends and holidays

  • For Teachers
  • You practice Giving the right context
  • Time about 5 minutes

About this exercise

Your late-work policy counts school days only, so weekends and the dates on your Holidays tab (A2:A12) don't count, and work turned in on or before the due date is 0 days late, never negative. Ask for one formula for E2 in one code block, then one line starting Example: that walks through the Nov 25 to Nov 30 row in plain words. Under 50 words outside the code.

Common mistakes when you ask AI for this

  • Leaving out the holidays. The AI skips weekends but counts Thanksgiving as school days. Try: Add: "Skip dates on Holidays!A2:A12."
  • Not saying how early work counts. The AI's formula shows -3 for work turned in early and counts the due date as a late day. Try: Add: "On or before the due date is 0, never negative."
  • No worked example. The AI explains the formula in jargon parents can't follow. Try: Add: "Example: walk through the Nov 25 to Nov 30 row in plain 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."
  • Getting a tutorial. By default the AI explains every part of the formula at length. Try: Add: "After the code, one line under 30 words. Nothing else."

What a strong prompt includes

  • Mentions the holiday list
  • Handles on-time and early work
  • Asks for a worked example
  • Asks for one formula

Practice this now ↑

Related exercises