Should I drop comp sci 1?

Hey everyone, I am a freshman in computer engineering and having a tough time deciding whether this is the right choice for me or not. So I have spent the past 11 weeks in computer science 1 having a tough time; every week, there is a homework and lab due. For every homework and lab so far, I have to ask for help from others and I can’t do anything. I understand the problem/solution, but never the in-between, the coding. I stare at the computer and don’t even know where to begin. You can teach me everything about programming and I can understand it, but I cannot apply it. Moreover, I have had two written exams and I got a C+ for the first one and a D for the second one. Students who are getting A’s are partying; I ask them how they do well and they took computer science courses in high school,and my high schools didn’t offer any courses in these fields. I have until one week to decide whether this is for me or not. I would like to finish the homework a couple days before it is due, but it’s so annoying that I have to depend on someone else so I can do it and submit it at that time. I am thinking about electrical engineering since I am not a fan of the software aspect of computer engineering, but I enjoy working with hardware. I talked to the dean of electrical engineering and he even told me to drop computer sci and focus on math and science. He said that I need a B or higher in both math and science, which I can see myself achieving. Can someone please help me make a choice?