Absolutely. A designer mindset probably has to work harder at it. But designers can at least learn basic programming, if not also advanced.
Frankly, as someone starting out with pathetically-low math skills and learning programming for the first time, I would have trouble no matter what language it was. There are simply wholly new ideas and ways of thinking in programming that HTML and CSS (being non-programming languages) simply don't have (hint at in many places, but don't have).
I actually started learning Perl, going through the Llama book ("Learning Perl"). Each chapter introduces basics of the language like variables and statements, blah blah. At the end of the chapter, there are a couple of exercises (and more if you buy a little companion workbook). It's meant to be used by teachers in a classroom who can further explain stuff.
So okay I get through the first 2 chapters and then they get into loops. And while I thought I got the example, I could not do a single one of the exercises in the back. The answers are in the back, and I'm looking at them and I'm like, well I can read these, but why couldn't I come up with them?
Same things: variables, statements, loops, conditionals, functions. This time, it wasn't entirely new to me, because Perl was quite similar. Learned more, but missed stuff.
Later, got more time to get back to the Llama. Found that the loops made more sense, and now I could do the exercises, and in more than one way. Which was very exciting (sad, excited by grokking loops, but, meh).
Certainly once you get over that "hump" of the concepts, and once you learn one programming language, learning more that aren't horribly different is much easier, or at least being able to get around and write stuff that works is easier (learning the details of a language would take way more time).
Some people are talented in programming and maybe already have a mindset that works because they already think a certain way, but I'd say anyone can learn basically how to think that way and at least be able to write simple things that work. And just as importantly, be able to read complex things and know what they're doing (and why). I'm not there yet, but I believe I will be.