In his dark blue business suit, President Obama climbed onto a bicycle anchored to the ground outside the White House. He pedaled in his polished dress shoes, generating electricity to run a water sanitation system built by a group of Florida teenagers.

He peered into a flask of green liquid containing a new breed of algae that was created by a 17-year-old Colorado girl who wants to solve the country’s energy problems.

And he shook hands with three small boys from Georgia who dreamed up a system to automatically cool down and hydrate sweating athletes.

“Keep in mind, they’re in third, fourth grade, and they’ve already got this idea,” Obama said. “If you’re inventing stuff in the third grade, what are you going to do by the time you get to college?”

It was the third annual White House Science Fair, designed to call attention to the importance of STEM — science, technology, engineering and math — and to honor the innovations dreamed up by young minds.

About 100 students from 40 states, ranging in age from 8 to 19, were invited to the event Monday afternoon.

The fair comes at a time of great concern among educators and policymakers that U.S. students have fallen behind their peers around the world in terms of STEM disciplines. It’s a worry the president shares.

“As a culture, we’re great consumers of technology, but we’re not always properly respecting the people who are in the labs and behind the scenes creating the stuff that we now take for granted,” Obama told the gathering at the White House, which included his top science advisers, among them those who run the National Institutes of Health, the National Science Foundation and NASA. “And we’ve got to give the millions of Americans who work in science and technology not only the kind of respect they deserve but also new ways to engage young people.”

The president announced several new initiatives aimed at getting more scientists and engineers to mentor students.

Many students at the science fair said they created their projects outside of school, teaching themselves the science involved or seeking out mentors in the community or at universities.

Easton LaChapelle, 17, of Mancos, Colo., taught himself enough computer coding and electronic skills to build a prosthetic arm controlled by brain waves. He made most of the parts with a 3-D printer — he has two in his bedroom — which significantly dropped the cost of the arm to about $400. Easton got his inspiration when he met a girl with an $80,000 prosthetic arm at a science and engineering festival.

“I’m all self-taught,” he said, explaining that his high school lacks the science courses and equipment to help him work on the level necessary for his project. “School is basically a waste of time. I’d be better off with those seven hours if I could just use them working on my own.”

Sara Volz, 17, of Colorado Springs, created a new kind of algae that produces oil as an alternative to petroleum-based fuel. “When I found out you can make fuel from pond scum, isn’t that the most awesome thing ever?” said Sara, the daughter of a veterinarian and a journalist.

Scientists have long considered algae as a potential biofuel but have been disappointed by the relatively low yield of oil the organisms produce. Sara figured out how to manipulate the algae cells to create algae that produces an unusually high level of oil.

“My school really doesn’t do anything with this,” Sara said. Instead, she sought technical help from scientists at the U.S. Air Force Academy and Colorado State University, and she set up a laboratory in her bedroom, which is cluttered with a microscope, flasks, tubes, an aerator and a clunky centrifuge. She grows the algae under her bed.

When it comes to science, too many schools stress formulas and memorization, instead of encouraging creative thought, she said.

“Science is a philosophy, it’s questioning the world around you,” she said. “It’s not just a collection of knowledge. Every child is born a scientist. We’re all born with this curiosity about the world and that’s what schools should emphasize.”

In his remarks at the White House, Obama complimented Sara’s work.

“Sara is breeding new types of algae. She stores this in a lab in her bedroom,” he said, to laughter. “So, Sara, you have very supportive parents.”

Jack Andraka, 16, of Anne Arundel County, was also singled out by the president, but it wasn’t the first time. A 10th-grader at Glen Burnie’s North County High School, Jack was a guest of First Lady Michelle Obama at the State of the Union address in February.

Working with Anirban Maitra — a professor of pathology and oncology at Johns Hopkins University School of Medicine and a top researcher in pancreatic cancer — Jack has developed a dipstick paper sensor that tests the level of a pancreatic cancer biomarker, a protein called mesothelin, in blood or urine. The method is faster, cheaper and more sensitive than current pancreatic cancer tests.

“Which is not bad for a guy who is just barely old enough to drive,” Obama told the crowd at the White House. “ . . . That’s pretty spectacular stuff. That’s great work. I don’t know what you guys were doing when you were juniors in high school. That’s what Jack is doing. Better than I was doing, I promise you.”