If someone had a chance to ask Bill Gates one question in all the world, what would it be?

Dafni Pratt, 16, a junior at Carver High School for Engineering and Science, got that chance during a video chat Wednesday at her school. With 30 other students looking on, Pratt asked the country's richest man, who led in putting computers into the hands of everyday folks, about the lack of women in computer science.

"Studies show that the percentage of women majoring in computer science has been falling since 1986," the teen from Southwest Philadelphia said. "In your opinion, what is the most effective strategy for high schools to help foster more young women to major in computer science?"

But technology let her down: The Skype video feed briefly failed, so Pratt could not see Gates as she posed her question.

The audio was working, though, so Pratt - who has three years of programming under her belt - heard Gates agree that work was needed to encourage more young women to prepare for careers in computer science.

"They are very important jobs, and the women who do them do just fine," he said. "But, somehow, we're intimidating [women] or sending them some kind of social expectations that's discouraging them."

Gates said women from the tech world have been effective going into schools to help shatter stereotypes and "to talk about how it really is quite a social profession."

The magnet school adjacent to Temple University's campus was among eight schools from North America chosen to participate in the 20-minute video chat with Gates as part of Computer Science Education Week. Each school got to ask one question.

After math teacher John Kalicki, who entered the school in the video chat contest sponsored by Code.org, got word last month that Engineering and Science had made the cut, the students started work toward coming up with a question.

"I thought it was a great honor that we were one of the schools, and we were some of the students who were chosen," Sean Plunkett, 14, a freshman from Roxborough, said. He said he had excitedly told his family: "I'm going to be in a videoconference with Bill Gates."

Although Engineering and Science does not receive as much attention as two of the district's other academic magnets, Central and Masterman High Schools, principal Ted Domers said his school had the second-highest score in the district in the state's School Performance Profiles. The 750 students got a 90.6 on the 100-point scale - just below Central's 90.8.

Kai Tinsley, 16, a junior from the Northeast, said Gates took a risk by dropping out of Harvard University to pursue his dream.

"He was able to take some promising technology and helped create a market that before had never existed," Tinsley said of the Microsoft Corp. cofounder.

Plunkett added: "He spread out between a wide variety of things - not just computers but phones, gaming. He makes many different people happy for many different things."

Despite the short failure of the video feed, Pratt said she was thrilled she had the chance to participate.

Gates, she said, is her hero.

"He has a lot of money," she said. "He's rich. But he doesn't just keep it to himself. He invests in the community and to better the lives of other people."

Senior Duane Johnson, 17, of Mount Airy, marveled that Gates would talk to students when he didn't have to.

"He's Bill Gates," Johnson said. "He took the time to talk to students about the profession and stuff. I think that speaks to the kind of guy he is."