I suspect you are using Ctrl+Enter to execute the code, that only runs the current line of code so the lines where you define
quarter_1_sales and quarter_2_sales have not being executed, ergo, they do not exist. You have to execute each previous line of code or source the entire script.