{"id":"code-hs-py-check-code-against-requirements","audience":"high-school","category":"coding","track":"coding","technique":"verification","title":"Check your program against the assignment before you submit","free":false,"task":"Before you turn in your temperature program, you want an honest check against the 4 requirements, not a fixed version. Ask for exactly 4 numbered lines, one per requirement in order, each either '1. Met - line 2' or '3. Not met - line 6: what's missing', with what's missing under 15 words. No code blocks and no corrected code, under 70 words in total.","materialLabel":"The assignment and your program (attached to your prompt automatically)","material":"Assignment 5 - Temperature Log (Intro to Python, Mr. Haddad)\n\nRequirements:\n  1. Use a loop to ask the user for 5 temperatures.\n  2. Store all 5 temperatures in a list.\n  3. Print the average, rounded to 1 decimal place.\n  4. Print \"Freezing!\" if ANY of the temperatures is below 0.\n\nMy program (line numbers on the left):\n\n1  temps = []\n2  for i in range(5):\n3      t = float(input(\"Temp: \"))\n4      temps.append(t)\n5  avg = sum(temps) / len(temps)\n6  print(\"Average:\", avg)\n7  if t < 0:\n8      print(\"Freezing!\")\n\nTest run:\nTemp: -3\nTemp: 4\nTemp: 5\nTemp: 2\nTemp: 1\nAverage: 1.8\n\n(It didn't print Freezing! but I think that's because the average\nisn't below 0?)","rules":[{"type":"numberedItems","count":4},{"type":"codeBlocks","count":0},{"type":"maxProseWords","max":70}],"mistakes":[{"title":"Getting a fixed program","why":"The AI's default is to rewrite your code, which is no longer your work.","fix":"Say: \"Don't fix it or show corrected code; just check it.\"","checks":["r2","codeBlocks"]},{"title":"Vague verdicts","why":"Without labels, the AI says 'mostly good' and you can't tell what to fix.","fix":"Add: \"Label each requirement exactly Met or Not met.\"","checks":["r0"]},{"title":"No line numbers","why":"Feedback without line numbers is hard to act on.","fix":"Add: \"Point to the line number for each one.\"","checks":["r1"]},{"title":"A long review","why":"The AI adds style tips and praise.","fix":"Add: \"Exactly 4 numbered lines, one per requirement.\"","checks":["numberedItems","maxProseWords"]}],"promptHints":[{"label":"Asks for a check, not a fix","patterns":["don'?t (fix|rewrite|correct)","no (corrected|fixed) code","just check"]},{"label":"Gives exact labels","patterns":["not met","\\bmet\\b"]},{"label":"Asks for line numbers","patterns":["line number","line \\d","which line"]},{"label":"Sets the number of lines","patterns":["\\b(4|four)\\b.{0,20}(line|requirement)","one per requirement"]},{"label":"Keeps it short","patterns":["\\d+\\s*words","short"]}],"hint":"A useful check tells you which requirement fails and where, and leaves the fixing to you. Ask for exact labels and line numbers.","rubricLabels":["Marks requirements 1 and 2 as Met and requirements 3 and 4 as Not met","The Not met line for 3 points to line 6 (no rounding to 1 decimal) and the one for 4 points to line 7 (it only checks the last temperature t, not every temperature)","Each line follows the form 'N. Met - line X' or 'N. Not met - line X: ...', and no corrected code or fixed line is given anywhere"]}