Barack Obama has urged young people to reject pessimism and interact with those who have different beliefs if they want to make changes in the world. 
On the final day of his last visit to Britain as US president, Obama told 500 youth leaders at a town hall meeting in London: “I’m here to ask you to reject the notion there are forces we can’t control. As JFK said, our problems are manmade and can be solved by man.” 
“You’ve never had better tools to make a difference,” he told the A-level and UK –US exchange students at the Q&A session. “Reject pessimism, cynicism and know that progress is possible. Progress is not inevitable; it requires struggle, discipline and faith.” 
But Obama acknowledged the challenges faced by young people: “Not to say your generation has had it easy, in a time of breathtaking change, from 9/11, 7/7 … and during an age of information and Twitter where there’s a steady stream of bad news.” 
The audience cheered as the president was introduced and went on to speak about his policies, including healthcare and education. 
He urged the audience to interact with people with different political beliefs: “Seek out people who don’t agree with you and it will also help you to compromise.” 
Obama also said: “You should feel encouraged social attitudes are changing. That doesn’t mean it’s fast enough but you should keep pushing and it’s in part due to the courageous acts of young people like yourself.” 
When asked about his presidential legacy, Obama said he was proud of the healthcare reforms, which received huge cheers from the audience, and said of the US response to the 2008 financial crisis: “Saving the world from great depression – that was quite good.” 
He also listed diplomatic deals with Iran and the response to the Ebola crisis as highlights of his presidency. “I’m proud; I think I’ve been true to myself during this process.” 
But he added: “Don’t give up and succumb to cynics if, after five years, poverty hasn’t been eradicated … It’s OK. Dr Martin Luther King says the arc of the moral universe is long but bends towards justice.” 
Questioned on the controversial Transatlantic Trade and Investment Partnership (TTIP), he said: “The answer to globalization is not to pull up the drawbridge and shut off,” though it was crucial to pay attention to workers’ rights. 
Before Obama arrived, Tanya Williams, a community engagement officer, told the Guardian: “I love Michelle but I like Obama and it’s exciting to have the chance to hear someone who has changed so much and galvanized so many people who didn’t vote before.” 
Oliver Sidorczuk, 26, said: “Everyone is extremely excited to listen to what he has to say. I’m going to ask him about electoral rights and try to ask him if he would join our campaign to ask David Cameron for automatic registration.” 
Obama ended the session by taking a question from a young Sikh Londoner, who asked about the issue of racial profiling at airports and being mistaken for a Muslim. 
Obama said that, although there were people with “crazy ideology”, pluralism was important. “I visited a mosque a few months ago and said our greatest allies are American Muslims who are most integrated and economically well off,” he said. 
Furqan Naeem, a campaigner from Manchester, said: “I recently visited the States through the US embassy on the community leaders programme and saw first hand some really important work the president did in celebrating America’s diversity and bringing communities together.” 
Kenny Imafidon, the managing director of the youth organization ClearView Research, said afterwards: “It was a great opportunity and what will stick with me is what he said about meeting with people who have different politics from you and having to make compromises. Also, the thing he said about being a good leader and finding great talent.” 
Later, Obama met Jeremy Corbyn, who said they had an “excellent” 90-minute discussion. 
The Labour leader said they talked about “the challenges facing postindustrial societies and the power of global corporations, and the increasing use of technology around the world and the effect that it has.”
Asked if they talked about the president’s intervention in the debate on Britain’s membership of the EU, Corbyn said it was discussed briefly. 
After the meeting, Obama joined Cameron to play golf at the Grove in Chandlers Cross, Hertfordshire. Obama ended the day at a dinner with the prime minister and the US ambassador, Matthew Barzun, at the ambassador’s residence, before travelling on to Germany.