When five-sixths of the jury have agreed upon their verdict they shall be conducted into court by the officer having them in charge. They shall be asked by the court or the clerk whether they have agreed upon their verdict, and if the foreman answers in the affirmative he shall, on being required, declare the same.