I bought and replaced my car battery. I think that might be why my car won't idle and the radio display says ‘CODE’ and doesn’t work.

 This is possible. Most cars need to have power all the time. Disconnecting your battery can reset the security systems and security codes in your car.
Your security code is probably on a card somewhere with your car’s manual. If you can’t find it, you might need to contact your car dealer or have it reprogrammed. All of our Roadside Patrols carry the necessary tools and information to help you get back on the road quickly which will help you avoid this problem.