Nucleotide polymers, with high relative molecular mass, produced by living cells and found both in the nucleus and cytoplasm. They occur in two forms, designated DNA and RNA, and may be double- or single-stranded. DNA embodies the genetic code of a cell or organelle, while various forms of RNA function in the transcriptional and translational aspects of protein synthesis.