Intelligence and ability-wise, I have no doubts you can do it! You are smart and writing code is almost never any sort of rocket science.
The only question is if you'll enjoy it enough to do 40+ hours a week, which you'll find out soon enough if you pour time and energy into classes and stuff.
One thing I'd say is that most coders don't code all day. Most coders have to spend a fair amount of time w/ clients figuring out requirements, working w/ testers, etc. So don't feel like it will be just you and a keyboard forever and ever.