Hermaphrodite
In zoology, an animal which can produce both sperm and ova is  a hermaphrodite. As an example, most earthworms are hermaphrodites. A simultaneous hermaphrodite has both sets of sex organs throughout life. A sequential hermaphrodite has ovaries at first, replaced by a testis later, or the other way round.