This error message is showing because the code is trying to use a variable called YEAR that is not defined. On lines 17 and 23, it is attempting to use YEAR in calculations and in a print statement, but YEAR has not been declared, causing a "cannot find symbol" error both times. Defining the YEAR variable would resolve this issue.