PHOENIX (AP) -- A Goodyear teenager accused of bringing a loaded handgun to his high school with plans to shoot a teacher has been sentenced to two years in jail. Maricopa County prosecutors say 16-year-old Izrahias Morales also was sentenced Monday to seven years' probation. Morales pleaded guilty to attempted first-degree murder last month. He was arrested by Goodyear police after he allegedly took a loaded semi-automatic gun to Millennium High School on Feb. 14, 2011. He allegedly planned to fatally shoot a math teacher.Police say Morales told detectives that he was upset the teacher wouldn't let him use a calculator to finish an assignment. Morales reportedly told police that he got the keys to his dad's lockbox, took out a handgun and brought it to school in his backpack.