Harry Potter and Marvel’s Avengers are among the famous characters taking on a new adventure: helping children learn computer-programming skills.