“Often we don’t give these victories the attention that they deserve,” Obama said. “When you win first place at a science fair, nobody is rushing the field or dumping Gatorade over your head. But it many ways our future depends on what happens in those contests.”

He also pointed out that the most common course of study for S&P 500 CEOs is engineering.

“Anybody with a good idea can prosper. Anybody with talent can succeed. … And that’s why it’s so important that we promote [STEM] education, on behalf of not just this generation but all the generations to follow,” Obama said.

He addressed the importance of holding on to talented teachers who can motivate students to pursue STEM education.

“When budget cuts across America threatened the jobs of countless teachers, we fought some tough competition to save the jobs of hundreds of thousands of educators and school workers, because nothing is more important than the investment we’re making in education,” Obama said.

Obama spoke about new public-private partnerships that offer additional training to more than 100,000 current teachers, as well as initiatives that will help prepare more than 10,000 new teachers in the next five years.

Other science projects included a device to discourage texting while driving and a test of whether foam really is the best material to pad the inside of a safety helmet.

Obama revealed that he had recently taped a special guest appearance on the Discovery Channel program “Mythbusters.”

“I didn’t get to blow anything up,” he said. “I was a little frustrated with that.”

Obama toured students’ exhibits at the fair, which culminates this weekend in the U.S. Science and Engineering Festival, held on the National Mall on Oct. 23 and Oct. 24. More than 1 million people are expected to participate on the National Mall and in more than 50 satellite locations.