Look into a paid tutor, say a computer science grad or even undergrad student. Coding will be part of her future, assuming she is in a STEM or business field, so this is a good investment. They won’t write the code for her, but may be able to explain how to layout the code. This is quicker than trying to understand everything about coding, she can work with the tutor to understand only the subset of scientific analysis or whatever. Actually, that may be the issue, she is caught up in thinking she needs to understand coding in general, but really she needs to only understand how to do the analysis assigned. Coding is just logic, data in/out and maybe an algorithm, so in a way it is a manageable thing to learn how to do, in steps.
Stop freaking out (DD and parent), there are still 7 weeks in the semester and most people who work hard will improve their grades. Don’t ever code the night an assignment is due, start the day it is assigned so you can get help with the parts or debug if the dang thing doesn’t work (happens to everyone). And … would the world end if she has one low grade ?
Find out the real procedure for dropping the class and any financial implications (is she taking so few courses that she has not met minimum credits for scholarship or what?). I think the admin probably wants her to continue trying, but may not come down on her as hard as you think with either not allowing a W or having a financial penalty.
And admit that at a top 20 school you should not go looking for trouble in an honors, selective admission class that involves coding, if you have no prior experience. Lay low for a semester or two and do well in all the required classes.
And if she can’t figure out coding, maybe a summer class next summer at a community college or on-line would help.