RALEIGH, N.C. -- Hundreds of high school students from all around North Carolina came and formed the YMCA Youth Legislature over the weekend.

During the 4-day conference at the Raleigh Convention Center, students wrote bills, elected delegates and learned the finer points of democracy.

"I've learned that democracy must be learned by every generation," said Cooper Edmunds, a North Raleigh Christian Academy student who served as governor of the Youth Legislature. "That's the motto of youth in government. Involvement in government--the media side, judicial, legislative--it's all equally important and the knowledge that students are able to get in just four days is amazing."

The students also elected their own governor for next year's legislature: John Bailey, also a student at North Raleigh Christian Academy.

"In this political climate we're in where there's so much mud raking and name calling and divisiveness, it's a good solace to come here," said Bailey. "These kids, they duke it out in chambers, but at the end of the day we're just here to learn and have fun."

This was the 25th year of the YMCA's Youth Legislature conference.

Get the latest news, sports and weather delivered straight to your inbox. Click here to sign up for email and text alerts.