“I got a lot of emails from science teachers who said, ‘Man I’d love to use your book as a teaching aid, but there’s so much profanity in it that we can’t really do that,’” said Mr. Weir, 44, who is cheerful, hyper-analytical and casually profane, much like his protagonist. “It’s hard to get that by a school board.”

Image

Apart from the four-letter words, “The Martian” is a science teacher’s dream text. It’s a gripping survival story that hinges on the hero’s ability to solve a series of complex problems, using his knowledge of physics, chemistry, astronomy and math, in order to stay alive on a hostile planet. (The Washington Post called the novel “an advertisement for the importance of STEM education.”)

After getting dozens of inquiries from teachers, Mr. Weir, who describes himself as “a lifelong space nerd,” asked his publisher, Crown, if they could release a cleaned-up edition of the book.

The novel was pretty easy to amend, by simply replacing the foul language with tamer words like “screwed,” “jerk” and “crap” (Mr. Weir said there were “occasional squabbles” when he tried to lobby the censors to keep some of the less offensive swear words in.) A kid-friendly version came out last year, and it is now being used to help teach science in classrooms around the country.

At Synergy Quantum Academy, a public charter high school in South Los Angeles, students are conducting experiments based on the novel. In physics class, students will build miniature solar-powered cars, and during astronomy next month, they will try to grow potatoes as Watney did, using a chamber modeled on NASA’s Lunar Plant Growth Chamber.