Writing code can be strange with you're just trying to learn about how electronics work. Defining ports, if/then/else and other conditionals on the screen have to get dumped into a microcontroller and then tested. But for quick, and simple electronics experiments, the Seeed Grove Mixer pack is the solution.
The Grove Mixer pack has 13 tidy modules that link together with simple 4-conductor wires. Some take an input signal (like a slide switch), some make a decision based on the input, and others do an action (spin a fan). By simply playing around with the arrangements, you develop a sense of how logic-based operations work in electronics. When you're done playing with the essentials, start combining your circuits with other microcontrollers for advanced features.
Drop a set down in front of some children, and see how they explore the links between the modules. The connectors are goof-proof, and the system is low voltage for full safe exploration of electronics. You'll be impressed how well the Grove Mixer Pack works!