Praise be to Allah.
Your attending a mixed school is haraam according to sharee’ah, because the mixing that you describe is exposing you to moral corruption and may be a means of causing you to commit sin.
In many ahaadeeth, the Messenger (peace and blessings of Allaah be upon him) warned men against the fitnah (temptation) of women, and he indicated that the matter is so serious that their fitnah is the worst of fitnahs and the most harmful thing.
It was narrated from Usaamah ibn Zayd (may Allaah be pleased with him) that the Prophet (peace and blessings of Allaah be upon him) said: “I am not leaving behind me any fitnah more harmful to men than women.”
Narrated by al-Bukhaari, 4808; Muslim 2740
It was narrated from ‘Uqbah ibn ‘Aamir that the Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Beware of entering upon women.” A man from among the Ansaar said, “O Messenger of Allaah, what about the in-law?’ He said, “The in-law is death.”
Al-Bukhaari, 4934; Muslim, 2172
Ibn Hajar said, commenting on the first hadeeth:
This hadeeth indicates that the fitnah caused by women is greater than any other fitnah. This is supported by the verse in which Allaah says (interpretation of the meaning):
“Beautified for men is the love of things they covet; women…”
[Aal ‘Imraan 3:14]
Allaah described them as being among the things that men covet, and He mentioned them first, before the other things, to indicate that they are the cause of the fitnah. We can see that a man is more inclined to love the children of a woman to whom he is still married than the children of a woman whom he has divorced.
Fath al-Baari, 9/138
Ibn al-Qayyim (may Allaah have mercy on him) said:
Undoubtedly allowing women to mix freely with men is the basis of all evils. This is one of the greatest causes of punishment coming down upon everyone and of public and private affairs becoming corrupt. Free mixing of men and women is the cause of much immorality and adultery, and it is the cause of general doom and diseases.
One of the greatest causes of general doom is the prevalence of adultery because of allowing women to mix freely with men and to walk amongst them making a wanton display of their beauty. If the powers that be knew how much corruption it causes to worldly interests and to people, they would prevent it most vigorously.
Al-Turuq al-Hakamiyyah, p. 408
In the mixing that you describe, it is not possible to lower one's gaze and it provokes women to desire men and vice versa. This is not permissible; rather this is the thing that leads to corruption. If the Messenger of Allaah (peace and blessings of Allaah be upon him) forbade that for his own cousin (son of his paternal uncle) al-Fadl ibn al-‘Abbaas, when he was riding with him on his mount and they were performing one of the dearest acts of worship to Allaah, namely the Hajj, when Al-Fadl was in the company of the Messenger (peace and blessings of Allaah be upon him) and at the time of the Sahaabah who were the most pious of people, then how can we allow the women of our own times, when diseases of the heart are widespread and religious commitment is at such a low level, to sit in the same place as men without a mahram, for so many hours every day?
Fear Allaah, my sister, and do not go to this school, no matter how difficult that may be. We will quote to you the hadeeth of al-Fadl referred to above:
It was narrated that ‘Abd-Allaah ibn ‘Abbaas (may Allaah be pleased with him) said: Al-Fadl was the riding partner of the Messenger of Allaah (peace and blessings of Allaah be upon him). A woman from (the tribe of) Kath’am came, and al-Fadl started looking at her and she started looking at him, so the Prophet (peace and blessings of Allaah be upon him) turned al-Fadl’s face to the other side. She said, “O Messenger of Allaah, the command of Allaah enjoining Hajj upon His slaves has come when my father is an old man and is not steady on his mount; can I do Hajj on his behalf?” He said, “Yes.” That was the Farewell pilgrimage.
Narrated by al-Bukhaari, 1442; Muslim, 1334.
Ibn ‘Abd al-Barr (may Allaah have mercy on him) said, commenting on this hadeeth:
This hadeeth demonstrates the natural desire for women that is created in human beings, and what may be feared from looking at them. Al-Fadl ibn ‘Abbaas was one of the young men of Banu Haashim, and he was the most handsome man of his time, according to what they said.
This also indicates that the ruler must prevent men and women from looking at one another. That includes preventing the women for whom there is no guarantee that they will not cause or be subject to temptation from walking in the streets and marketplaces and places where they can look at men. The Prophet (peace and blessings of Allaah be upon him) said: “I am not leaving behind me any fitnah more harmful to men than women.” And Allaah says (interpretation of the meaning):
“Tell the believing men to lower their gaze (from looking at forbidden things), and protect their private parts (from illegal sexual acts)…”
This is sufficient for the one who ponders the meanings of the Book of Allaah and is guided to act upon it.
There is no need for mixing. Studying in this school is not essential; so long as a woman can read and write and knows the teachings of her religion, that is sufficient, because she was created for that, i.e., to worship Allaah. Anything beyond that is not essential.
And Allaah knows best.