Modify hw2-3-grade; add negative input cases.