To overcome your bad attitude, you should try to define the reasons of it. Here are some possible causes:
Not understanding the matter of the subject or its separate parts
It's a serious problem, especially when you are an 'easy learner'. Such situations might happen, for example, when you change the school and realize that your new classmates are a couple of classes ahead of you.
Non-acceptable style of teaching
A lot of students everywhere are caught in this situation. For instance, when you prefer to be given the direct instructions to follow and your teacher usually provides them unclearly and indefinably instead. That may cause a misunderstanding between you and your lecturer and lead to a loss of interest as a result.
Unconscious imitation of your classmate's reaction
When your attitude towards the subject is really not your own, but based on your friend's points of view. It can happen when you don't want to feel different from your classmates so you make yourself think the same way.
An unfair teacher
A common situation, when you think your lecturer's marks/comments are more influenced by their personal opinion about your lifestyle, beliefs, views, rather than your knowledge. As all we know, usually, our opinion about a person depends on the first impression, and it is very hard to change it later despite the person's hard efforts.
What are the solutions?
In all the situations mentioned above, firstly, you should think and ask yourself if the reason for your negative attitude is really the discipline. Why? The answer is very clear and easy. Maybe this sphere is really your vocation and you are walking away from it now because of some undefined reasons... It is very important to realize it now, of course, if you do not want to spend half of your life searching for your calling. But how to understand whether you don't like the subject or the way it is taught? Try to look on the studying from the different angles: find a new tutor, try new learning techniques. Here are some tips on how to make it work:
Do some research
Yes, easy like it is! Just spend some time and 'google it'. You will find so many different articles, videos, books, and other information about various new achievements and discoveries in this sphere. You will feel inspired and ready for the new beginnings. Interesting video lectures can easily play a role of a good and inspiring teacher.
Find an additional tutor
If you have such an opportunity, it may really help to solve all your problems. Sometimes, different explanation and teaching style can change everything, including your negative attitude. You will become more confident in your knowledge. Your teacher's unfair comments and marks will not worry you anymore.
Attend some additional classes or clubs
It is an interesting and vital experience for every student. You should try it! You will have a wonderful opportunity to meet new people with the same interests, make new friends, and share some new facts and findings in the sphere of this discipline. You will definitely feel delightful and inspired!