CREATE TABLE table_24652 ("No. in series" FLOAT, "No. in season" FLOAT, "Title" TEXT, "Directed by" TEXT, "Written by" TEXT, "Original U.S. air date" TEXT, "Prod. code" FLOAT)

Who wrote episode 31 in the series?
SELECT "Written by" FROM table_24652 WHERE "No. in series" = '31'
SELECT "Written by" FROM "table_24652" WHERE "No. in series" = '31'