conditionals — where ai silently bugs6 / 9
elif chains and the match statement cursor reaches for
Claude generated a grade-letter chain. The output for score = 95 is B
instead of A. The broader condition >= 80 is being checked before the
narrower >= 90, so a 95 always falls into the B bucket.
Reorder the branches so a 95 prints A, and the chain still works for
other scores.
The break is on lines 3, 5 — but read the whole snippet first.
⌘↵ runs the editor.
Booting Python…
Output
[promptdojo:~]$ _