This school treats its most troubled students like trailer trash, whistleblowers say.

The principal of William Cullen Bryant HS in Long Island City, Queens, has rounded up more than 20 failing kids with behavior problems — and put them in a trailer where they stay all day.

Principal Namita Dwarka calls the boxy, red trailer housing the confined misfits “the Scholars Academy.”

Teachers come to the trailer for English, math, science, history and other classes. Even lunch is brought in. If kids go into the cafeteria, they are not served, one told The Post. The only break is phys ed in the yard, when a teacher “rolls out the balls.”

“Most of the kids are not happy with the situation,” a staffer said.

Some “act crazy” during class, making it difficult to concentrate on work, one trailer student said. Others defiantly listen to music on headphones.

The trailer empties out as the day goes on. By the last two periods, “everybody leaves, nobody stays there,” the student said.

If he sticks it out, he’s the only one in the trailer besides the teacher. “She just sits there, looks at me, and waits for the bell to ring,” he said. A dean lets him sign in and leave.

The student’s mom was shocked to learn of the cooped-up conditions.

“I thought it was the regular school,” she said. “You might as well send them to Rikers Island.”

Teachers describe the trailer assignment as “challenging.”

“It’s a struggle to teach these kids,” one said. “They are not easy kids to deal with.”

Staffers said the trailer may get laptop computers so students can do online “credit recovery” to make up for failed classes.

Others say the isolation is not conducive to success.

“These are kids with a lot of ­issues,” said Gus Prentzas, president of the Bryant HS parents association. “To have them locked up in a space like this is unacceptable.”

Prentzas called the trailer — which looks “like a shipping container” — not only jail-like, but a potential health hazard.

Teachers have reported seeing mold in the trailer, which is air-conditioned and has a couple of small windows.

Officials said the trailer was inspected but no mold was found. Two other trailers hold classes that regular students ­attend for single periods.

The “Scholars Academy” “is designed to provide extra academic support in a safe and structured environment,” a DOE spokesperson said, adding that the program aims to help “over-aged, under-credited students” graduate.

“There is some relief in the building,” a staffer said. “These kids are no longer a problem in the halls or the classes they would have attended.”