SAN FRANCISCO — Female, black and Latino students took Advanced Placement computer science courses in record numbers, and rural student participation surged this year, as the College Board attracted more students to an introductory course designed to expand who has access to sought-after tech skills.

This year, 135,992 students took advanced placement (AP) computer science exams, a 31 percent increase from last year, according to data from the College Board, the organization that administers standardized tests that help determine college entrances as well as AP courses.

Females and under-represented minorities were among the fastest growing groups. African-American students taking AP computer science courses rose 44 percent to 7,301, Hispanic and Latino participation gained 41 percent to 20,954 and female participation rose 39 percent to 38,195, said Code.org, a nonprofit that advocates for implementing computer science programs in every American school.

Rural student participation also spiked. The number of rural students taking AP computer science exams jumped 42 percent to 14,184.

Code.org – which gets support from major tech companies like Microsoft, Google, and Amazon – helps train teachers and recruit students for a CS Principles class in partnership with the College Board to bring computer science studies to more students and schools after finding unequal access to curriculum. Just 2% of schools with the highest percentage of underrepresented students of color offered AP Computer Science, Code.org said when it teamed up with the College Board in 2015. Most students who took the course were white or Asian and male.

The nonprofit wants to give many more students access to the highly-valued subject.

“Our society is rewriting every industry using computer science, and we shouldn’t limit participation in that only to a lucky few," said Hadi Partovi, Code.org founder and CEO.

Code.org works with both public and private schools but pays special attention to low-income schools in urban and rural areas. The idea is to expose high school students, especially those belonging to groups currently underrepresented in the tech industry, to computer science training and to hopefully provide access to high-paying tech jobs in the future.

“The idea that we wouldn’t introduce it to every student in every school seems un-American,” Partovi said.

Girls still are only 28% of all students taking AP Computer Science exams, while underrepresented minorities are 21%.

In 2015, Code.org teamed up with College Board to help train and fund high schools so they could offer computer science classes both at the standard high school level and the advanced level for college credit.

Computer Science Principles is meant to be more accessible and less daunting than AP Computer Science Class A, an intensive coding class where students learn to use Java.

College Board developed the CS Principles class in 2008 in partnership with the National Science Foundation, which funded the development and three-year pilot of the class. According to College Board, Code.org is one of 10 providers endorsed by College Board to train teachers, including Project Lead the Way, UTeach, Mobile CSP and Beauty and Joy of Computing.

“The goal was to change the invitation to the computer science class party,” Trevor Packer, senior vice president of AP and instruction at College Board. “The party is working with kids and a teacher working with a variety of computer science applications.”

There will be 1 million job openings in the next decade that require computer science experience, Packer said.

Zach Sweet, a calculus teacher from Detroit’s public school system who taught the Principles class for the first time this year, said the curriculum is meant to encourage creativity. Students aren’t hunched over computers learning how to code. Instead, classroom interactions include a mix of problem-solving pursuits, lessons about the internet and cybersecurity and discussions about technology responsibility and equity.

Sweet’s AP Computer Science Principles class at Renaissance High School had 35 students, 63 percent of whom were female. All but two of his students decided to take the final exam, and 27 passed. Twenty-six of those who passed were African American and one was Latino. The previous year just eight African American students passed the AP Computer Science Principles exam in the state of Michigan.

Sweet said learning computer science is a way to for his students to get a leg up economically. “Some, if not all, come from low-income backgrounds,” he said. “Getting a position in computer science is a way to improve your situation.”

Sweet studied math and German in college and received a master’s degree in education. He had almost no training in computer science before participating in Code.org’s program. He didn’t even own a smartphone until last year. But he got some help from a volunteer at a Microsoft-funded program called TEALS or “Technology Education and Literacy in Schools.”

TEALS pairs volunteer tech professionals with computer science teachers, and Sweet worked with a volunteer throughout the course who could provide industry expertise.

Teachers “want to learn new things, they’re innovative and they’re passionate” but don’t have the training to teach computer science, Mary Snapp, corporate vice president and lead for Microsoft Philanthropies, said. On the other hand, tech industry volunteers “know computer science but don’t necessarily know how to teach in an effective way.”