I bought a new ford focus sel hatchback with 29 miles, after 3 weeks the battery died and they replaced it with a new one. It died again?

Can they trade my car for another one. I'm not gonna keep paying for a car that don't work. It has 300miles now

Your new car is still under factory warranty. Your dealer has a responsibility to fix any problems that occur. If he can't do that within a reasonable time, you can talk to the manufacturer's customer service department and see what THEY offer for a solution. READ your owner's manual. You MAY also benefit from your state's "Lemon Laws", but typically you must give the dealer and the manufacturer a chance to fix the problems first.

If you want legal advice, go talk to a lawyer.

They probably need to check the charging system as opposed to just replacing the battery.

This is why new cars come with a warranty. They are not going to exchange the car for another one.

Probably the alternator is the original problem. A shorted diode will allow the battery to drain through the alternator to ground.

Can they? Sure. They won't.

Have the dealer to try again. Demand a free loaner while they are working on it. If they are unsuccessful after 4-5 tries, you can file a claim for the LEMON LAW and they will be forced to either give you another vehicle or refund all of your money. There are Attorneys who specialize in handling Lemon Law cases and the manufacturer has to pay their legal cost separately from your claim.

Let them fix it under warranty. It's free

It's beat to death.