A nice way to make it so you can resurface after you get the solar panel upgrade is to dig diagonally, so you can climb up. If you run completely out of energy and you haven't climbed up yet, you can click the X button on the day over menu, and you can keep going.
You could make this into a coding tutorial, like whenever you buy an upgrade the game shows you what it should look like, what coding lines you need to do it, and then tell you if you got it right or not.
Sounds like you're describing http://code.org