Finally, a course even a class clown could love.

City students at three public schools are cutting up in an accredited class in improvisational comedy — as schools try to inject more entertainment into education.

Launched as a five-week pilot program last year, Laugh It Out is grading students for getting laughs at three schools — the Preparatory Academy for Writers in Queens, Queens Preparatory Academy and the Harlem Renaissance HS — and may expand to as many as 20 next fall. The program can run anywhere from a trimester to a full year.

“The idea of programs like ours is to make school a place kids want to be,” said Robin Getlan Pancer, director of the Comedy Hall of Fame Foundation, which created the program.

“They get to communicate; they take risks; they build a community,” she added. “They’re constantly seeking out more of it, and they feel connected.”

Instructors have included comedians Eddie Brill, Mario Cantone and Walt Frasier, who led a class last week at the Preparatory Academy for Writers.

Among the activities was a game in which all 20 students formed a circle and took turns making up a sentence that the next student had to expand on with the connector “yes, and” — a classic improv device to keep scenes going.

“I like the aspect that you can be yourself,” said Starasia Wright, 14, a ninth-grader. “You don’t have to worry about judgment or what anybody else says.”

Principal Charles Anderson said students had been leaving the school, which is sixth- through 12th-grade, after middle school before he introduced creative courses like improv.

He added that he’s noticed positive changes in the kids so obvious that they can see them, too.

“It helps me be more open. I used to have stage fright before improv — even for everyday conversations,” said Kadeem Spencer, a 15-year-old sophomore. “[Now] I’m more confident.”

yoav.gonen@nypost.com

