Yes, and certainly ladder is less than ideal for that puzzle, but coding it might be useful practice and involve making and comparing choices how to design it (e.g. how to loop over the 300k+ possible permutations).
And although we would not expect that puzzle to show up in a real project, certainly things like coding a PID when no PID instruction is available can occur.
Also, I helped my brother finding the pressure to send to a hydraulic cylinder supporting a frame that held up a winding roll. The tension on the web winding onto the roll needed to follow a particular profile vs. length of material on the roll. The frame was pivoting so the hydraulic pressure needed to account for the contribution of the time- (length-) dependent weight of the roll to the web tension:
- from material increasing on the roll, as well as
- from the changing angles/geometry of the frame and hydraulic strut as the diameter of the material increased between the roll axis and a fixed nip roll.
So yes, sometimes formulae more involved than A plus B, or A times B, need to be coded. It's not hard, but doing it correctly, cleanly and then documenting it does take some effort, so someone (e.g. you) can understand it several months down the line.