Run timed flashcard drills when user says "drill <category>" (e.g., "drill bitwise", "drill 1-bitwise", "drill arrays"). Reads all flashcards upfront, quizzes rapidly, logs results, drills missed cards, then updates README.
Run a timed flashcard drill session for a category in 0-python-flashcards/.
.md file is one flashcard: the H1 heading is the question, the code block is the answer03-clear-bit.md = Q3, 01b-row-type.md = Q1b)**Q:** line of the flashcard (NOT the H1 heading)After the last card, ask the user for their time in seconds, then run:
~/.pyenv/versions/python-coding-dojo/bin/python scripts/log_flashcard_drill.py <category> --score <correct> --count <total> --time <seconds> --notes "Missed: Q3, Q7, Q12"
IMPORTANT: Always include --notes with the list of missed question numbers (e.g., "Missed: Q3, Q7, Q12"). Use the question number from the filename (e.g., 03-clear-bit.md = Q3).
Category names in progress.yaml:
bitwise (for 1-bitwise)arrays (for 2-arrays)strings (for 3-strings)linked-lists (for 4-linked-lists)stacks-queues (for 5-stacks-queues)binary-trees (for 6-binary-trees)heaps (for 7-heaps)searching (for 8-searching)hash-tables (for 12-hash-tables)sorting (for 13-sorting)bst (for 14-bst)recursion (for 15-recursion)dynamic-programming (for 16-dynamic-programming)greedy-invariants (for 17-greedy-invariants)graphs (for 18-graphs)If any cards were missed, offer to drill them again. Repeat until user is satisfied.
~/.pyenv/versions/python-coding-dojo/bin/python scripts/update_readme.py
Then commit and push (no "Claude" in commit message):
git add -A && git commit -m "Log flashcard drill: <category>" && git push
From log_flashcard_drill.py:
Each .md file in 0-python-flashcards/<category>/:
# Card Title
**Q:** Question text here?
**A:** Brief answer description
\`\`\`python
answer_code_here
\`\`\`
The filename determines the question number (e.g., 01-read-csv-basic.md = Q1, 01b-row-type.md = Q1b).
User: "drill bitwise" Claude: reads all 17 files in 0-python-flashcards/1-bitwise/ Claude: "Ready! 17 cards. Say 'go' when ready." User: "go" Claude: "Q1: How do you get bit at position i?" User: "(x >> i) & 1" Claude: "Correct!
Q2: How do you set bit at position i?" ... Claude: "Done! 16/17 correct. What was your time in seconds?" User: "485" Claude: logs attempt with --notes "Missed: Q5" Claude: offers to drill missed card