tracebacks — cursor wrote this and crashed5 / 9
diagnose any crash in one read
Cursor wrote a function that computes the average revenue per order. When
there are no orders yet, it crashes with ZeroDivisionError.
Add a one-line guard so that when orders is 0, the function returns
0 instead of crashing. The script should print avg: 0.
The break is on line 2 — but read the whole snippet first.
⌘↵ runs the editor.
Booting Python…
Output
[promptdojo:~]$ _