Assalaamu alaykum wa rahmatullaahi wa barakaatuhu. You said that it is haram to attend coeducational schools if we feel inclined towards doing haram. Are you talking about fornication? Touching or looking? Falling in love? You must be aware that Muslim coeducational schools do not have free mixing (during class time at least); the boys and girls just sit in the same room.
All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
What is meant by falling into what is forbidden with regard to mixed schools is every sin that could result from this mixing, such as forbidden looks, touching (of bodies), and being in seclusion with those whom one is not permitted to be in seclusion with (i.e. those who are not Mahram [permanently unmarriageable] to each other).
The looking and touching that you mentioned are forbidden because they are a means to fornication, and it is an incitement to it even if it did not reach the extent of actual fornication.
It should be noted that the forbidden mixing in Islam is not just the presence of male and female students under one roof that does not result in anything of what we have mentioned. If there is a distinction (separation) between them, then this is not considered forbidden mixing. But the problem may exist when the female students are not wearing hijab and so on.
The Fiqh Encyclopedia reads, “The Ruling of mixing between men and women differs according to whether or not it is in conformity with the principles of the Islamic Sharia. Thus, mixing is prohibited if it involves being in seclusion with a non-Mahram woman, looking at her with desire, lack of decency of the woman (i.e. when she reveals her beauty and is dressed indecently), flirting, and touching of bodies, such as mixing at weddings and festivals... ”
Allah knows best.
You can search for fatwa through many choices