As an exercise, eschewing functions and if-then cascades can force you to consider the problem in alternate ways. Program design is all about choosing the right way to model the problem. If you get in the habit of modeling all problems the same way, both efficiency and clarity can suffer. I was good at building DFAs, so many times I'd program a problem as a DFA, even if it wasn't the most natural way of expressing the problem. (I'm a lousy programmer.) As a student you're both assessed on your ability to be flexible in solving the problem, as well as how good a coder you are. Flexibility is all about the design stage of programming, but it's hard to teach such skills in a classroom. So as a classroom exercise, I think it can be useful.
![[Image: extraordinarywoo-sig.jpg]](https://i.postimg.cc/zf86M5L7/extraordinarywoo-sig.jpg)