Students are under pressure to take as many math and science courses as possible, lawmakers said.

Washington’s high school students may have a greater incentive to take Advanced Placement computer science courses in the future, which state lawmakers hope will spur more school districts to offer the classes.

A measure approved by the state Legislature would allow AP computer science to count as a high school math or science course, rather than only as an elective class.

That means students could count AP computer science toward their high school graduation requirements, as long as they still complete Algebra II and at least one lab-based science class. The class could also be used to meet math admission requirements for four-year universities.

(Next page: What state lawmakers are doing to boost STEM preparedness)