Minecraft has a mod called ComputerCraft, which adds lua-powered computers to the game. They can read various state from the world, like redstone levels and chest contents, and move things between chests and set redstone outputs and play sound and etc. You can also upgrade them into turtles, which can move around and mine blocks and stuff. It's a nice environment for basic robotics programming with immediate feedback.
(IIRC there's theoretically an "educational edition" of this, but I don't know if I'd put much stock in that; you're close enough and personalizing the learning enough that you're probably better off just using the normal mod.)