Nuclear magnetic resonance (NMR) shielding tensors for the oxygen and hydrogen nuclei, as well as nuclear quadrupole coupling tensors for the oxygen and deuterium nuclei of water in the liquid and gaseous state, are calculated using Hartree-Fock and density functional theory methods, for snapshots sampled from Car-Parrinello molecular dynamics trajectories. Clusters representing local liquid structures and instantaneous configurations of a single molecule representing low-density gas are fed into a quantum chemical program for the calculation of the NMR tensors. The average isotropic and anisotropic tensorial properties of 400 samples in both states, averaged using a common Eckart coordinate frame, are calculated from the data. We report results for the gas-to-liquid chemical shifts of (17)O and (1)H nuclei, as well as the corresponding change in the nuclear quadrupole couplings of (17)O and (2)H. Full thermally averaged shielding and quadrupole coupling tensors are reported for the gaseous and liquid-state water, for the first time in the case of liquid. Electron correlation effects, the difference of classical vs quantum mechanical rovibrational averaging, and different methods of averaging anisotropic properties are discussed.