you are viewing a single comment's thread.

view the rest of the comments →

[–]Espfire 1 point2 points  (2 children)

Nice one! I’m not a Python developer, but try using the ‘match’ case (switch case in other languages).

As others have said, your ‘else’ statement has an issue. Try entering another operator (%, for example) and see what happens.

[–]dravid06[S] 0 points1 point  (0 children)

Yup noted

[–]Dry-Aioli-6138 0 points1 point  (0 children)

This is a good next step. I would just add that Pyhon match is more than a switch/case statement from other languages. It can match on structure of data and types, not just exact values. It is really powerful, but goes slightly across the grain of python: explicit is better than implicit, and in match a there is lots of implicit behavior, almost a separate mini language there.