SAN FRANCISCO — Google is teaming up with Chance the Rapper to bring computer science education to Chicago's public schools.

The Internet giant's philanthropic arm Google.org is giving $1 million to Chance the Rapper's SocialWorks organization and $500,000 to the schools. Chicago is the first national school district to mandate computer science education for all students.

Chance the Rapper made a surprise appearance at Adam Clayton Powell Jr. Academy on Wednesday, where fifth-grade students were working on a coding activity with Google employees as a part of Computer Science Education Week.

Chance The Rapper at Google's CS First Roadshow at Adam Clayton Powell Jr. Academy in Chicago, IL. Chance The Rapper surprised students at the coding event, and was there to announce a new $1.5 million grant from Google.org to support computer science education in Chicago's public schools.
Google

The performer, a Chicago native whose real name is Chancelor Jonathan Bennett, is the latest to join a growing national effort to put computers and computer skills in the hands of boys and girls from all racial, ethnic and socioeconomic backgrounds. Computer science skills such as analytical thinking and creative problem solving are critical for young people who will be hunting for jobs in an increasingly automated society.

Chance the Rapper was educated in the public schools and has been vocal during the funding crisis for the school system, which is the nation's third largest and serves more than 400,000 students. The mission of SocialWorks, an organization he helped create, is to empower youth.

More: Google: Race, gender gaps persist in computer science education

More: Google to give $1 billion to nonprofits and help Americans get jobs in the new economy

More: Most TV computer scientists are still white men. Google wants to change that.

More: More black and Latino students learn to code as Code.org classes swell

Coding classes are popping up in high schools and in lower grades across the country. And those classes have the potential to address unequal access to computer science education.

Research conducted by Google shows that black students are less likely to have computer science classes in school and are less likely to use computers at home even though they are 1.5 times more interested in studying computer science than their white peers. Black and Hispanic students are less likely than white students to use computers at home, too. Some 58% of black and 50% of Hispanic students say they use a computer at least most days at home compared with 68% of white students, Google found.

And, even as more kids study computer science, too few of them are African American, Latinos or women. That's reflected in the lopsided demographics of the technology industry.

Google, which three years ago pledged to close the race and gender gap to make its workforce better reflect the panoply of people it serves around the globe, is still overwhelmingly male and employs very few African Americans and Hispanics. Tensions over that diversity drive are running high at Google, which recently fired an employee who wrote an internal memo suggesting men are better suited for tech jobs than women.

Justin Steele, principal with Google.org, says the grant will bring computer science and arts curriculum to Chicago classrooms. David Drummond, Alphabet's senior vice president of corporate development, the Google parent company's most prominent African-American executive, was on hand to make the funding announcement.

"There’s so much talent and creativity in the communities that these schools serve—and Chance The Rapper embodies what can happen when that creativity is unleashed," Steele said. "With exposure to computer science, students can use technology to turn their creative passions — whether that’s art, writing, music or something else — into something bigger."

Follow USA TODAY senior technology writer Jessica Guynn @jguynn