NEW YORK -- President Barack Obama spent Friday hanging out with students at Pathways in Technology Early College High School, before telling them they're "starting something across the country" in a speech in the Brooklyn school's auditorium.

P-Tech, a new vocational school run in collaboration with IBM, goes two years beyond traditional high school and lets students graduate with an associate's degree. New York Gov. Andrew Cuomo and Chicago Mayor Rahm Emanuel, both Democrats, have praised the effort and called for the creation of more schools in its image.

Obama first mentioned the school during his 2013 State of the Union address. "What's going on at P-Tech is outstanding, and I'm excited to see it for myself," Obama told the crowd in February.

On Friday, he used his visit to the school to push for investments in education in the upcoming federal budget conference. Sequestration cuts are expected to trim $1.2 trillion in funding for vocational schools like P-Tech over 10 years.

"If you think education's expensive, wait 'til you see how much ignorance costs," Obama said. "Don't tell me we can afford to shut down the government ... but we can't afford to invest in education."

Education investments are key, he said, because of an increasingly global economy. "Those countries are working every day to out-educate and outcompete us," he said, calling the days when a high school degree was sufficient for stable employment "over and … not coming back." He ran through the administration's education priorities: expanded pre-school, getting schools access to high-quality internet service, controlling costs and boosting teacher quality.

Before the event started, New York politicians squeezed into small plastic chairs, vying for a good spot. Education officials, such as New York City schools chancellor Dennis Walcott and academic director Shael Polakow-Suransky, were in attendance, as was New York State schools commissioner John King. American Federation of Teachers President Randi Weingarten appeared as well. Michael Mulgrew, president of the United Federation of Teachers, rubbed shoulders -- and even appeared to hug -- New York City Democratic mayoral candidate Bill de Blasio, despite the barbs they traded during the primary campaign.

Before his speech, Obama visited a P-Tech Algebra 2 class with U.S. Secretary of Education Arne Duncan. According to a pool report, he quipped that a student in the class should tutor his daughters, Sasha and Malia since he's no longer the best homework helper. "I liked math, but then it started to get harder," Obama said. "And so that can be frustrating."

In his speech, Obama said he was impressed by the math class. So much so, he said, that it got him thinking "whether its too late to send Congress here."

"You guys have opportunities here that you don't find in most high schools yet," he told the P-Tech assembly. "You'll be in demand."

P-Tech took root as part of the larger Paul Robeson High School, which the Bloomberg administration chose to shut down. The school stopped accepting ninth-grade students in 2011, the year P-Tech opened with about 100 students. While Robeson is now winding down with only a few students and teachers left, P-Tech is growing and expects as many as 450 students next year.

Outgoing Mayor Michael Bloomberg gave a brief speech Friday, in which he thanked Obama for making schools like P-Tech possible.

"This was once a large high school that had been failing its students for much too long," he said. "The Obama administration stood by us as we worked to transform failing schools across the city."

Also on HuffPost:

Loading Slideshow...
  • Obama Holds Final Primary Night Event In St. Paul

    ST. PAUL, MN - JUNE 3: Democratic presidential candidate Sen. Barack Obama (D-IL) (R) and his wife Michelle Obama bump fists at an election night rally at the Xcel Energy Center June 3, 2008 in St. Paul, Minnesota. Obama clinched the Democratic presidential nomination following today's primaries in South Dakota and Montana, although his rival Sen. Hillary Clinton (D-NY) has not yet conceded the race. (Photo by Scott Olson/Getty Images)

  • Barack Obama

    President Barack Obama acknowledges the crowd as he exchanges fist bumps with the audience after speaking at Hyde Park Academy, Thursday, Feb. 14, 2013, in Chicago. (AP Photo/M. Spencer Green)

  • Obama Fist Bump

    President Barack Obama fist-bumps custodian Lawrence Lipscomb in the Eisenhower Executive Office Building following the opening session of the White House Forum on Jobs and Economic Growth, Dec. 3, 2009. (Official White House Photo by Pete Souza)

  • President Barack Obama does a fist bump

    President Barack Obama does a fist bump with Ethan Gibbs, the son of Press Secretary Robert Gibbs, after arriving by Marine One on the South Lawn of the White House, Washington, DC, April 19, 2009. President Barack Obama returned from the Fifth Summit of the Americas held in Trinidad and Tobago. AFP PHOTO/Aude GUERRUCCI (Photo credit should read Aude GUERRUCCI/AFP/Getty Images)

  • Barack Obama Campaigns Across U.S. Ahead Of Primaries

    SPRINGHILL, WV- MAY 12: Democratic presidential hopeful Sen. Barack Obama (D-IL) (L) bumps fists with Iraq war veteran Paul Scott after playing a game of pool during a stop at Schultzie's Bar & Hot Spot May 12, 2008 in Springhill, West Virginia. Sen. Obama and Sen. Hillary Clinton (D-NY) continue to battle for the Democratic presidential nomination. (Photo by Mark Wilson/Getty Images)

  • McCain And Obama Address LULAC National Convention

    WASHINGTON - JULY 8: Los Angeles Mayor Antonio Villaraigosa (L) gives a 'fist bump' to presumptive Democratic presidential nominee Sen. Barack Obama (D-IL) during the national convention of the League of United Latin American Citizens (LULAC) at the Washington Hilton July 8, 2008 in Washington, DC. Obama has been recently criticized for moving to the political center after calling for a slowing of withdrawal of troops from Iraq, supporting a proposed wiretap law and government funding of faith-based programs. (Photo by Chip Somodevilla/Getty Images)

  • Barack Obama Campaign Weeks Away From Election Day

    CHANTILLY, VA- OCTOBER 22: Democratic presidential nominee U.S. Sen. Barack Obama (D-IL) fists bumps with Ethan Gibbs the son of Robert Gibbs the campaign communication director as he arrives at Dulles International Airport October 22, 2008 in Chantilly, Virginia. Obama continues to campaign with election day less than two weeks away. (Photo by Joe Raedle/Getty Images)

  • U.S. Democratic presidential candidate Illinois Senator Barack Obama (right) and North Carolina Governor Mike Easley bump fists at Sen. Obama's surprise appearance at a North Carolina Democratic Party dinner October 4, 2008 at the The Grove Park Inn in Asheville, North Carolina. AFP PHOTO/Stan HONDA (Photo credit should read STAN HONDA/AFP/Getty Images)

  • President Barack Obama

    BAGHDAD, IRAQ - APRIL 7: In this handout provide by the White House, U.S. President Barack Obama (L) receives a fist-bump from a U.S. soldier as he greets hundreds of U.S. troops during his visit to Camp Victory on April 7, 2009 in Baghdad, Iraq. Obama is serving as the 44th President of the U.S. and the first African-American to be elected to the office of President in the history of the United States. (Photo by Pete Souza/White House via Getty Images)

  • President Barack Obama

    WASHINGTON - APRIL 8: In this handout provide by the White House, U.S. President Barack Obama (L) holding a football, offers a fist-bump, to senior staff member Pete Rouse (R), during a meeting with senior advisors in the Oval Office of the White House on April 8, 2009 in Washington, DC. Obama is serving as the 44th President of the U.S. and the first African-American to be elected to the office of President in the history of the United States. (Photo by Pete Souza/White House via Getty Images)

  • US President Barack Obama gives a studen

    US President Barack Obama gives a student a fist bump while touring the Wind Turbine Manufacturing and Fabrication Lab at Lorain County Community College, in Elyria, Ohio, January 22, 2010. Obama is visiting Ohio to tour local businesses and hold a town hall meeting on jobs and the economy. AFP PHOTO / Saul LOEB (Photo credit should read SAUL LOEB/AFP/Getty Images)

  • US President Barack Obama bumps fists wi

    US President Barack Obama bumps fists with a school children after reading Christams book 'The Polar Express' to an audience of elementary school children at the Richard England Clubhouse and Community Center in Washington, DC, on December 21, 2009. AFP PHOTO/Jewel SAMAD (Photo credit should read JEWEL SAMAD/AFP/Getty Images)

  • US President Barack Obama fist-bumps wit

    US President Barack Obama fist-bumps with a supporter after speaking at a fundraiser for Senator Michael Bennet February 18, 2010 at the Fillmore Auditorium in Denver. AFP PHOTO/Mandel NGAN (Photo credit should read MANDEL NGAN/AFP/Getty Images)

  • US President Barack Obama (2nd-R) fist b

    US President Barack Obama (2nd-R) fist bumps with Marvin Nicholson as he plays golf at Farm Neck Golf Club in Oak Bluffs on Martha's Vineyard, Massachusetts, on August 26, 2010. The US First Family is vacationing on the Island until August 29. AFP PHOTO/Jewel Samad (Photo credit should read JEWEL SAMAD/AFP/Getty Images)

  • President And Mrs. Obama Host Annual Easter Egg Roll

    WASHINGTON, DC - APRIL 25: (AFP OUT)U.S. President Barack Obama gives a fist bump to a young boy during a 'Let's Move' tennis clinic during the White House Easter Egg Roll on the South Lawn of the White House April 25, 2011 in Washington, DC. About 30,000 people are expected to attend the 133-year-old tradition of rolling colored eggs down the White House lawn. (Photo by Chip Somodevilla/Getty Images)

  • US President Barack Obama gives a young

    US President Barack Obama gives a young boy a fist bump as he greets guests after speaking about the economy at Shaker Heights High School in Shaker Heights, Ohio, a suburb of Cleveland, on January 4, 2012. Obama announced plans to appoint Richard Cordray as acting head of the Consumer Financial Protection Bureau in a recess appointment, bypassing Congress and setting up a bitter election-year legal showdown with Republicans. AFP PHOTO / Saul LOEB (Photo credit should read SAUL LOEB/AFP/Getty Images)

  • Barack Obama

    President Barack Obama fist bumps service members after he addressed troops at Bagram Air Field, Afghanistan, Wednesday, May 2, 2012. (AP Photo/Charles Dharapak)

  • US President Barack Obama (L) asks for a

    US President Barack Obama (L) asks for a fist bump from a young girl as he speaks with patrons outside the Kozy Corner restaurant in Oak Harbor, Ohio, July 5, 2012, where he made an unannounced visit to speak with supporters while on a bus tour of Ohio and Pennslyvania. AFP PHOTO/Jim Watson (Photo credit should read JIM WATSON/AFP/GettyImages)

  • Obama Welcomes 2012 NCAA Women's Basketball Champions To White House

    WASHINGTON, DC - JULY 18: U.S. President Barack Obama gives a fist bump to Baylor University basketball guard Terran Condrey while welcoming the 2012 NCAA Women’s Basketball champions in the East Room of the White House July 18, 2012 in Washington, DC. The Baylor Lady Bears became the first NCAA basketball team to complete a 40-0 season by defeating Notre Dame 80-61 in the NCAA women's championship. (Photo by Chip Somodevilla/Getty Images)

  • Barack Obama, Odyssey Sims

    Point guard Odyssey Sims gets a fist bump from President Barack Obama at a ceremony honoring the 2012 NCAA Women's basketball champions Baylor University Bears in the East Room at the White House in Washington, Wednesday, July 18, 2012. (AP Photo/Charles Dharapak)

  • US-VOTE-2012-DEMOCRATIC CAMPAIGN

    US President Barack Obama (L) fist bumps with supporters after delivering remarks during a campaign event at Truckee Meadows Community College in Reno, Nevada, August 21, 2012. AFP PHOTO/Jim WATSON (Photo credit should read JIM WATSON/AFP/GettyImages)

  • Barack Obama

    President Barack Obama pounds fists with a supporter after speaking at a campaign event at The Memorial Athletic and Convocation Center at Kent State University Wednesday, Sept. 26, 2012, in Kent, Ohio. (AP Photo/Tony Dejak)

  • US-VOTE-2012-DEMOCRATIC CAMPAIGN

    US President Barack Obama fist-bumps with a woman during a lunch visit to the West Tampa Sandwich Shop and Restaurant in Tampa, Florida, September 8, 2012, during the first day of a 2-day bus tour across Florida. AFP PHOTO / Saul LOEB (Photo credit should read SAUL LOEB/AFP/GettyImages)

  • US-VOTE-2012-DEMOCRATIC CAMPAIGN

    US President Barack Obama (L) fist bumps a supporter after speaking at a campaign rally in Nashua, New Hampshire, on October 27, 2012. AFP PHOTO/Jim WATSON (Photo credit should read JIM WATSON/AFP/Getty Images)