Author: Mayuresh Mandalik
Department: Computer Engineering, 2nd Year
Track: AI & Prompts (Vibe Coding Round 2)
This project demonstrates bug fixes and accessibility improvements for a small web and Python task. It includes:
-
Mobile Menu Fix (
buggy.html)- Mobile menu toggles correctly on small screens (≤640px)
- Keyboard support: Enter/Space toggles menu
- Focus outline is visible
- ARIA attributes updated dynamically
- Inline
// FIXcomments indicate changes
-
Average Calculator Fix (
buggy.py)- Reads
marks.csvand computes the correct average - Skips header, blank lines, and invalid rows (
oops,NaN) - Rounds output to two decimals
- Inline
# FIXcomments indicate changes
- Reads
-
Prompt Engineering Documentation (
prompts.md)- Role, Constraints, Critique→Refine, and Python prompts documented
- Notes explain what changed and why
- Tools/Models used: GPT-4.1, VS Code, Chrome DevTools, Python 3.13
-
Unit Tests (
test_buggy.py)- Contains two small tests for
buggy.pyaverage function - Verifies correct handling of valid and invalid rows
- Confirms output rounds to two decimals
- Helps ensure the Python fix works reliably
- Contains two small tests for
- Open
buggy.htmlin a browser. - Resize browser or use mobile view.
- Click the menu button or use Enter/Space to toggle.
- Ensure
marks.csvis in the same folder asbuggy.py. - Run:
python buggy.py- Output prints the average rounded to two decimals, e.g.: 82.60
python test_buggy.py-
Expected output:
Test 1 passed ✅
Test 2 passed ✅
- HTML menu: Opens/closes on click & keyboard, focus visible, ARIA updated.
- Python average: Correct average calculated ignoring invalid rows (oops, NaN), rounded to two decimals.
- Unit tests: Both tests pass, validating the Python fix.