{"id":"code-work-teach-fix-average-formula","audience":"teachers","category":"coding","track":"coding","technique":"verification","title":"Fix a class average formula that punishes excused work","free":false,"task":"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.","materialLabel":"The gradebook and the formula (attached to your prompt automatically)","material":"GRADEBOOK - Algebra 1, Period 2 (row 1 is headers)\nA Student | B ID | C Quiz 1 | D Quiz 2 | E Quiz 3 | F Test 1 | G Quiz 4 | H Test 2 | I Average\n\nFormula in I2, filled down:\n=SUM(C2:H2)/6\n\nRows:\nNoa K. | 88 | 92 | 79 | 85 | 90 | 84 | -> 86.3\nOmar B. | 75 | EX | 80 | 72 | 78 | 81 | -> 64.3\nPia T. | 95 | 91 | | 89 | 94 | | -> 61.5\nQuinn R. (joined Nov 4) | | | | | | | -> 0\n\nNotes from Mr. Haddad:\n- EX means excused (illness, family trip, etc.).\n- Pia's blanks are assignments not graded yet.\n- Parents see these averages in the portal every Friday.\n- Tests and quizzes count the same this semester.","rules":[{"type":"codeBlocks","count":1},{"type":"numberedItems","count":1},{"type":"maxProseWords","max":35}],"mistakes":[{"title":"Accepting a quick patch","why":"The AI may wrap it in IFERROR and keep dividing by 6.","fix":"Add: \"Skip EX and blanks instead of counting them as zeros.\"","checks":["r0"]},{"title":"Forgetting new students","why":"A student with no scores shows an error or 0.","fix":"Add: \"Show No grades when there are no scores yet.\"","checks":["r1"]},{"title":"Leaving rounding out","why":"Parents see averages like 84.333333.","fix":"Add: \"Round to 1 decimal.\"","checks":["r2"]},{"title":"Not limiting the reason","why":"The AI writes paragraphs about SUM versus AVERAGE.","fix":"Add: \"Then exactly 1 numbered line starting Problem:, under 20 words.\"","checks":["numberedItems","maxProseWords"]},{"title":"Getting a menu of options","why":"The AI likes to offer two or three versions of the formula, so you're left to pick and test them yourself.","fix":"Add: \"Give one formula only, in one code block, no alternatives.\"","checks":["codeBlocks"]}],"promptHints":[{"label":"Skips EX and blanks","patterns":["\\bex\\b","excused","blank"]},{"label":"Handles new students","patterns":["no grades","no scores"]},{"label":"Asks for rounding","patterns":["round","1 decimal","one decimal"]},{"label":"Asks for one reason line","patterns":["problem:","1 numbered line|one numbered line|one line"]},{"label":"Asks for one answer only","patterns":["\\b(one|single|1)\\s+(formula|code block|block|version)","only one","no (alternatives|options|other versions)"]}],"hint":"Tell the AI what the formula should do with EX, blanks and brand-new students, and how short the reason should be.","rubricLabels":["Averages only the numeric scores in C2:H2 (AVERAGE(C2:H2), or SUM divided by COUNT), so EX and blanks aren't counted as zeros","Shows the text No grades when there are no numeric scores (such as IF(COUNT(C2:H2)=0,\"No grades\",...))","Rounds the average to 1 decimal with ROUND(...,1)"]}