Forty students learning how to code in a classroom on the third floor of Pontifical Catholic University in downtown Rio de Janierio got an unusual assignment Friday: Nobel Prize winner Malala Yousafzai stopped by to ask if they might help her ensure girls around the world have access to quality education.

She challenged the students to create the digital tools needed to help the Malala Fund reach young women throughout Brazil. The students readily agreed, joining 460 classmates at nine other developer academies Apple runs throughout Brazil in honing their skills by tackling real-world problems.

The program is but one example of big tech companies lending their profits, products and profile to non-profit causes. Apple announced its partnership with the Malala Fund earlier this year after CEO Tim Cook met Yousafzai at Oxford University and the two "hit it off," said Lisa Jackson, Apple's VP of social initiatives.

Yousafzai is a Pakistani activist who at 17 became the youngest person to win a Nobel prize. She gained international attention after Taliban soliders shot her in the head because of her efforts to improve educational opportunities for young women. She started her eponymous fund four years ago.

Related: Apple partners with Malala Yousafzai to fund girls' education

"They have the vision, they have the voice obviously, they have the platform," Jackson said. "We're here to help with everything from support to hardware to people support, which is what [this] is about. What we can do is help be a supporter in very real ways of the work that Malala and her team envision."

The students doing the heavy lifting of creating the tools the Malala Fund needs attend one of the developer academies Apple has launched in Brazil, Italy, and India since 2013. The academies use Swift, Apple's programming language, and plan to apply their skills in fields ranging from graphic design to communications.

Each academy strives to recruit a balance of male and female students from a variety of backgrounds, and enjoys far better success than tech firms in Silicon Valley.

"When I first stated out, I had no idea there was a diversity problem for this area," said Beatriz Magalhães, a teacher at the Rio location. "I only figured it out when I went to WWDC and there was a giant line for the men's bathroom and not the women's bathroom."

Magalhães was 19 when she started attending the academy in 2014. Since becoming a teacher earlier this year, she's watched students build apps that do everything from highlight films made by and starring women to helping epileptics keep track of their seizures.

The academies use challenge-based learning, a style of education that places students, not teachers, at the center of each lesson. Students are given challenges tied to broad topics like health, the city, or equality. Then they interview people in the communities they hope to help, using those insights to ensure people actually find their products useful.

For the Malala Fund challenge, they'll focus on ways to increase girls' enrollment in school, skills development for teachers and students, and advocacy.

"I am eager to see their innovative ideas to help girls in Brazil and across the globe," Yousafzai said in a statement.

Jessica Hollander met Yousafzai as the Nobel laureate toured the academy. She found herself inspired by the young activist, who turned 21 on Thursday, and already thinking about how she can contribute to Yousafzai's goal of educating other young women like her.

"I would like to work with kids, honestly, and on empowerment," Hollander said. "Because for me, when you code you empower yourself."