I was watching the credits for the last didc in my Monty Python’s Flying Circus boxed set, and I saw the name Douglas Adams. A common enough name, but I decided to check it out. IMDB does indeed say that Adams wrote for the episode ‘Party Political Broadcast on Behalf of the Liberal Party’. He also wrote some Doctor Who episodes.
He worked on various stuff with Graham Chapman in that time frame. He also appears (as a non-speaking character) in one or two Python episodes from the 4th Series.
Adams co-wrote the sketch wherein the doctor’s nurse stabs his patients, while the doctor himself (Chapman) blithely practices his golf swing.
Adams was always quick to point out that his contributions to Monty Python were extremely minimal; he didn’t like it when his fans touted him as a “writer for Monty Python.” (The book Monty Python Speaks has some good quotes from Adams on his time working with Chapman.)
Doug Adams was script editor for “Doctor Who” for a season and slipped in some references to his own “Hitch-hikers” series into stories. During one story, the Doctor is trapped under some rubble and, while his assistant du jour Romana seeks help, the Doctor bides his time by reading an intergalactic travel guide. The Doctor reads aloud an entry describing a particular planet as “devoid of atmosphere and incapable of supporting life.” The Doctor derisively points out (to no one in particular) that the “planet” in question is actually a cosmic-sized amoeba that’s grown a super-hard shell. This is directly lifted from a passage in “Hitchhiker.”
Furthermore, Adams worked on scripts for the infamous Doctor Who serial “Shada” that was half-filmed, shut down due to a union strike, and never aired. In “Shada”, the Doctor & Romana visit a retired Time Lord who lives in cognito at Eton (?) college. This Time Lord’s apartment is actually a TARDIS in disguise. Adams lifted this idea (in a bowlderized form) in his non-“Hitchhiker” novel “Dirk Gently’s Holistic Detective Agency”.
Also note that the third Hitchhikers novel, Life, the Universe, and Everything, was originally intended to be a Dr. Who story arc. Shoehorning a Dr. Who plot into the Hitchhikers mythos was rather problematic, since most of the HHGTTG characters would prefer to mind their own business, which is why Trillian spent most of the time moving the plot along.
And just to bring it full circle, there’s an episode of Dr. Who that he wrote (in which an alien convinces DaVinci to pant several copies of the Mona Lisa) which has a cameo appearance by John Cleese.
Neil Gamon’s biopgraphy of Adams spends a lot of time talking about he time with Python, his collaborations with both Graham Chapman and Terry Jones, and the whole Dr. Who/H2G2 story. I just finished it last week, and if you are at all interested in just who Douglas Adams was, you should read it. It has been updated by Gaimon since Adams’s death.
The sketch is Death by medical paperwork. I don’t remember the nurse stabbing the patient – but the bulk of the sketch is the stabbing victim being made to fill out a series of forms in triplicate as he exsanguinates, and Dr. Chapman cheerfully explains that he’d like to be able to treat him faster, but the NHS are real sticklers about this sort of thing. 
I rented a VHS tape of Shada from Blockbuster, once. It had been edited with a preamble by Tom Baker, with Tom also filling in summaries of all of the missing scenes. It was interesting and contains my all-time favorite line. After talking about how the lead actress had cried when shooting was stopped (it was her first lead part), he said that the entire cast was sad. Even Douglas Adams, the writer, was sad. Then he looks off into the middle distance and says: “Poor Douglas, I wonder whatever became of him.”
Did Adams only write for Python at the end when Cleese left? I knew he wrote for them and I thought it was only the last couple of episodes.
Neither the greatest of Python sketches nor anywhere near the best that Douglas Adams was capable of, but a good example of Chapman at his least flappable. Also the gallons of spewing comedy blood made quite an impression on at least one youngster more accustomed to stylized, gore-free American network TV violence:
Doctor (to patient hemhorraging freely from thoracic wound): Now, what seems to be the matter?
Patient: I’ve just been stabbed by your nurse!
Doctor: Oh dear… Well, I suppose I’d better have a look at you, then.
Patient: She…she just stabbed me!
Doctor: Yes, she’s an unpredictable sort…
