How come the flashlight works when you switch the batteries but my walkman or gameboy doesn’t?
The bulb in a battery doesn’t care which way current flows through it. The metal has no asymmetry that would treat left-moving charges differently from right-moving charges. That’s not true of the transistors in a walkman or gameboy. They contain specialized pieces of semiconductor that will only allow positive charges to move in one direction, not the other. When you put the batteries in backward and try to propel current backward through its parts, the current won’t flow and nothing happens.