Library › Data AI › College students
Split a utility bill by days each roommate was home
- For College students
- You practice Giving the right context
- Time about 5 minutes
About this exercise
Your apartment splits the $240 October electric bill (in F1) by days each roommate was home, listed in column B. A fifth roommate moves in next month, so the total must cover B2:B6 (row 6 is empty for now). Ask for one formula for C2 in one code block that still works when filled down to C6, then exactly 2 numbered lines labeled Fill down: (why it works in every row, in plain words) and Check: (what Jae owes). Under 45 words outside the code.
Common mistakes when you ask AI for this
- Not mentioning fill-down. The AI repeats your formula without $ signs, so C3 to C5 break. Try: Add: "It must still work when filled down to C5."
- Not saying how to split. The AI splits evenly or by some other rule. Try: Add: "Split by days home; total covers B2:B6 for the new roommate."
- No check. Without a known answer, you can't tell if it's right. Try: Add: "Check: what Jae owes."
- 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 absolute references at length. Try: Add: "Each line under 15 words. Nothing else."
What a strong prompt includes
- Says how to split
- Mentions filling down
- Asks for a check
- Asks for one formula
Related exercises
- Add input validation to a Java method with exact messages (Coding AI · Software developers)
- Add type hints that still run on Python 3.8 (Coding AI · Software developers)
- Announce a discount-approval process change in three bullets (Sales AI · Managers and team leads)
- Announce a hybrid work policy change with clear actions (Writing AI · HR and recruiting)
- Announce a new weekend rotation in three clear rules (Productivity AI · Managers and team leads)