elif chains and the match statement Cursor reaches for — step 7 of 9
Cursor wrote a match statement that handles three commands but forgot the
catch-all. When command = "shutdown" (which isn't in any case), the
variable result never gets set, and line 11 crashes with a NameError.
Add a case _: block at the end so unmatched commands produce
result = "unknown". The script should print unknown.
Cursor wrote a match statement that handles three commands but forgot the
catch-all. When command = "shutdown" (which isn't in any case), the
variable result never gets set, and line 11 crashes with a NameError.
Add a case _: block at the end so unmatched commands produce
result = "unknown". The script should print unknown.
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.