Apple has launched a free iPad app to encourage more children to code.
Swift Playgrounds uses the tech firm's programming language Swift to teach users basic programming concepts, so they can write code to guide cartoon characters through a colourful world, solving puzzles and mastering challenges.
Te Akau Ki Papamoa Primary School in the Bay of Plenty has been using the beta version of the app for the last couple of months with its nine to 12 year olds in Years 5 and 6.
"The kids all have iPads and it's a really easy way to ease the kids into learning to code," says teacher Glen Storey.
"They're learning a real programming language, not just one that's only used in the classroom."
Apple is hoping Swift Playgrounds will be widely embraced by schools around the world.
At its iPhone 7 launch, the tech firm introduced Everyone Can Code, a new education initiative. Swift Playgrounds is a part of that programme.
"It's really important for children to learn coding because it teaches thinking skills," says Mr Storey.
"It's also a really good creative outlet because you can solve any problem a billion different ways. One day some of them might even pick coding as a career."
Learning aside, the app is fun, simple enough for children to use but with enough challenge to keep adults going.
While it's aimed at children aged 12 and older, it does work well with younger children as Te Akau Ki Papamoa Primary School has proved.
It's also something many adults might enjoy or a way for parents to work on a project with younger kids.
Commands are issued to the cartoon characters such as moveForward() and turnLeft(). Implementing these commands, along with loops and conditionals, allows you to guide the character through the different levels.
A keyboard with shortcuts makes it easy to enter code.
Short lessons introduce new concepts and Apple says it will regularly release new standalone challenges, so students can continue to refine their coding abilities as their skills and interests grow.
Since Swift Playgrounds uses real Swift code, projects can be exported directly to Xcode to create programs for iOS and macOS that can ultimately be turned into full-fledged apps.
Teachers and developers can also use Xcode to create their own challenges for the app.
The app is free to download from the App Store today but needs Apple's latest mobile software which launches on Tuesday night, iOS 10, to work.