Where a petition shall have been filed as much as twenty days and service perfected as much as fifteen days prior to any regular or quarterly term of the court, and the defendant shall fail, on or before the first day of such term, to file any answer or plea, or any other sufficient defense, the court shall grant judgment immediately without intervention of a jury in favor of the plaintiff; but in the discretion of the court, such default judgment may be opened during the same term and the defendant allowed to plead. This shall not operate to relieve the plaintiff from the necessity of proving the amount of his claim in cases of unliquidated damages. Where a plea or answer is filed at the first term of the court, and a jury is demanded, the case shall be continued until the next regular quarterly term of the court, unless, by consent of both parties, it be tried at the first term of the court. The court may, at the first term, hear and determine demurrers, and if all the defendant's pleas or answer be stricken, the court shall proceed to enter up judgment as in cases of default as above provided.