A Texas school district was forced to take “corrective action” over an “inappropriate” homework assignment in which students were asked about rape during a lesson on DNA, according to officials.

The controversial question was doled out to about 90 biology students at Klein Collins High School outside Houston on Friday.

“Suzy was assaulted in an alley and is a victim of rape,” the assignment read. “The police collected a sample of sperm that was left at the crime scene and now have three suspects in custody. Which of the suspects raped Suzy?”

The students then had to choose which of the three samples matched the original DNA material found at the crime scene.

In a statement obtained by The Post, district officials said the assignment was not part of its approved curriculum and is not representative of its educational philosophy.

“The district has investigated the source of the materials and appropriate corrective action has been taken,” the statement read.

A spokesman for the Klein Independent school district declined to provide additional details, including whether the teacher who assigned the question will be disciplined and exactly how it became assigned.

Parents of students at the school, meanwhile, said they were flabbergasted when upon learning of the assignment, which also circulated online, KPRC reported.

“It’s upsetting and I know girls this age, just the thought … they know that rape is forced non-consensual sex and that upsets them,” Cookie VonHaven, the parent of a tenth-grader at the school, told the station. “That’s why I can’t fathom a teacher putting that on a test.”

Dana Duplantier, the parent of a ninth-grade student at the school, said she’s unaware if her child received the assignment, but questioned if the instructor had appropriate oversight.

“Wouldn’t [the teacher] have to get that approved by the school board or teachers or something to put that in there?” Duplantier said.