The New York City school system may have to invest in a lot of bananas, as students in the city's public middle and high schools will now be required to take sex education classes for the first time in nearly two decades.

The new mandate calls for public schools to devote a course to the "facts of life" in either sixth or seventh grade, and then again in high school during the ninth or tenth grade. The order will go into effect in the second semester of the 2011-2012 school year.

As a result of the policy shift, middle school students will receive basic lessons on topics such as anatomy, puberty and pregnancy. Older students will take part in more in-depth lessons, including instructions on condom use, although the city's Department of Education reports that instructors will provide verbal instructions on the subject. Students who wish to see a physical demonstration will be able to do so in a separate health resource room.

Parents will have the right to pull their children out of lessons regarding birth control methods, according to school officials.

In an effort to encourage teens to wait before experimenting with sex, courses will also discuss how to resist a partner's unwanted sexual advances and how to avoid becoming ensnared in abusive relationships.

"We must be committed to ensuring that both middle school and high school students are exposed to this valuable information so they can learn to keep themselves safe before, and when, they decide to have sex," Chancellor Dennis Walcott reportedly wrote in an e-mail to staff.

Middle and high school students are currently required to participate in a one-semester state-mandated health education course that does not necessarily include sexual health instruction. Instead, the decision is left to individuals schools, which Walcott wrote has resulted in "an uneven system that ... does not serve our students well."

A city Department of Education survey conducted this spring found that 64 percent of middle schools and 38 percent of high schools already teach sex education courses, leaving a sizable gap of teens with no recourse for learning about sexual health.

In particular, the New York Times reports the new mandate is aimed at educating black and Latino teens, who are statistically more likely to contract sexually transmitted diseases and have unplanned pregnancies than whites. The move is part of the Bloomberg administration's broader strategy of improving the lives of young minorities through a variety of educational and youth programs.

"When we look at the biggest disadvantages that kids in our city face, it is blacks and Latinos that are most affected by the consequences of early sexual behavior and unprotected sex," Linda I. Gibbs, the deputy mayor for health and human services, told the source.

Twenty states and the District of Columbia currently mandate sex and HIV education in public schools, according to an analysis by the Guttmacher Institute, which studies reproductive health. Another 12 states, including New York, only require HIV education. In addition, the Institute found that nationwide, one in four teens between 2006 and 2008 learned about abstinence without receiving any instruction on birth control options.

Comprehensive sex education courses have been shown to a variety of positive health benefits, according to Advocates for Youth, an organization that champions reproductive and sexual health for young adults. Those benefits include delaying the initiation of sexual activity, reducing instances of unprotected sex and lowering rates of unplanned pregnancies and sexually transmitted diseases.