@bjkmom and @twogirls are absolutely correct: When you are failing a class, you have to go to office hours, work with tutors, find study groups and go over previous test information. Maybe the professor had too much faith in your ability. Professors DO NOT LIKE to fail their students!
Your 9 pages may not have directly answered the questions; or may have been a combination of terms and discussions that didn’t make sense. The quantity of pages does not mean a thing if you didn’t answer the questions correctly. Most people can ramble on about a subject and not make any sense.
The students who get A’s also work “hard” but they put in extra efforts. I have a dd who attends every tutoring session, office hour, and study group even though she’s an A student. She said she learned early that the A students attend office hours and study groups.
Use this as a learning experience. Next time, you’ll do better.