Everyone with a primary school child has probably heard of Scratch and the alternative ScratchJR for preschoolers. But there are alternatives in a similar vein that may be more attractive.
A big problem with Scratch is its reliance on Flash which is less supported these days, especially on tablets.
First, as most kids seem to enjoy Minecraft, a good place to start getting the little ones' interest may be the code.org tutorials.
I plan to try that on my daughter because I cannot get her interested in Scratch and I think, for a year-3 child, ScratchJR is too basic to be sufficiently engaging.
The Minecraft Hour of Code uses Blockly from Google. An alternative to that is Snap from Berkeley which is also worth a look.
This walkthrough is a good introduction to Blockly.
You can Read more about Blockly and Snap here.
A free version of Minecraft, the Pi Edition is available for the Raspberry Pi despite being officially discontinued.