BURLINGTON, Vt. — U.S. Sen. Bernie Sanders urged graduates at Champlain Valley Union High School on Friday not to walk away from the serious problems facing the country and the world.

The independent senator and former presidential candidate gave the commencement address at the University of Vermont gymnasium, telling the students that turning their backs on the problems would be easy. But if they do: “Who is going to fill that gap? I’m telling you coming right back from Washington, D.C. many of the people who fill that gap are not necessarily to be trusted,” Sanders said.

Sanders drew applause and cheers from the filled gymnasium when he called for public colleges and universities to be tuition-free, urged the students not to allow anyone to divide them up because somebody’s race, religion or nation of origin may be different than theirs and said climate change needs to be addressed.

“Climate change is not a hoax. It is real. It is caused by human activity. And if we are going to preserve this planet for our children and your children and your grandchildren it is imperative that we have the courage, not easy, to take on the fossil fuel industry and transform our energy system away from fossil fuel to energy efficiency and sustainable energy,” he said.

The commencement came days after Sanders said the man who shot a congressman and four other people in Virginia had apparently volunteered for his 2016 presidential campaign. Sanders assailed violence as “unacceptable in our society” and said he was “sickened by this despicable act.”

James T. Hodgkinson of Belleville, Illinois, opened fire on Republican lawmakers, aides and others practicing baseball in suburban Alexandria, Virginia. Officers shot Hodgkinson, who later died.

On Friday, Sanders told the students to use their education and life experience to do everything they can to revitalize American democracy “to make sure it represents all of us, not just a handful of billionaires.”

“You have to my mind a moral responsibility to be patriots, to remember the sacrifices of so many who maintain and strengthen American democracy. So I don’t want you to look away. I don’t care what your political ideas are. I want you to listen to other people’s ideas, I want you to treat other ideas with respect. That’s how you learn. But I don’t want you to walk away from the problems facing this country, of which there are so many,” he said.