Terence David John Pratchett was born on April 28, 1948, in Beaconsfield, Buckinghamshire, northwest of London, to David Pratchett, an engineer, and the former Eileen Kearns. He did not finish school and was fond of saying that he had received his best education at the Beaconsfield Public Library.
An early interest in astronomy spurred his reading of science fiction. He worked as a journalist for a newspaper in Buckinghamshire and in 1971 published his first novel, “The Carpet People,” about a tribe, known as Munrungs, that lives on a vast carpet.
Mr. Pratchett’s other books include “The Unadulterated Cat,” an illustrated (by Gray Jolliffe) collection of cat anecdotes; “Good Omens,” a comic fantasy about the birth of the son of Satan, written with Neil Gaiman; “The Dark Side of the Sun,” a science-fiction novel; and “Dodger,” a novel for children set in Victorian England and inspired by Dickens.
He is survived by his wife, the former Lyn Purves, and a daughter, Rhianna.