I cannot write code! I will never succeed!

All students, regardless of their skills, will get their degree sooner or later. The only way for them not to complete their studies is if they quit. This is not a handy quote to use in order to make you feel-better. It is the reality and it works both ways: Getting the degree means nothing by itself exactly because of that. It the beginning of a long path for you to follow. It is not that important to get a bachelor as it is to prepare for the rest of your career.

Thus, there are two things you have to consider:

  1. if you are studying computer science, you have to learn the basics even on fields you do not like (or not study at all)
  2. everyone can learn the basics.

So, initially you have to acknowledge that every single student you have met has the capability of learning everything needed for a bachelor degree in computer science.

Then, you have to make a plan and allocate enough time.