Please go buy Shirlee Kalstone's book on housetraining. If you have this, it will explain why she isn't getting the message and you can reread the relevant parts. I must have reread that book 100 times when I was housetraining Jaspar.
Also please read:
http://www.diamondsintheruff.com/housetrain.html
and:
http://www.diamondsintheruff.com/htsmdog.html
It is *normal* for puppies to try to do this. The answer is making sure she isn't in the situation to make mistakes. That may mean crating, carrying her, or sitting with her at arm's length and the second she looks like she has to go, out she goes in your hands so she can be *successful* and get praise outside. Every mistake inside is one step backwards and even more time to get her to understand the right place to go.
Basically she shouldn't have the freedom right now to be able to go on carpets. Was she alone in the basement? Realistically, she should not have access at this age to areas where there's carpet. Ever. Have you carefully cleaned with enzymatic cleaner? If not she simply scents where she has gone before and goes in the same place again.
The problem you have now will be that she has been unsupervised enough times (even if it was just a second of not having her at arm's length, under close watch) that she isn't at all getting the message that pooping outside is what is desired. So YOU need to be there to make she she is never, ever able to go inside. Then when she goes outside, you need to be there with her to praise and reward/treat. Also are you taking her out on a lead and *waiting* with her til she goes? Taking the time each time to walk her around, which helps her bowel to get started? You need to stay out with her til she both pees and poops -- not just pees. If she only pees, and YOU make the decision to risk bringing her back in (which remember is YOUR risky choice! Not hers!) she must be at arm's length constantly under watch when back inside. If she is just being let out to do her business then let back in, this also leads to her simply waiting til she is back inside where it is nice and warm to go.
Remember, puppies can only learn by us teaching them. That means a lot of very hands on, attentive work and TIME in the initial weeks and months that they are with us. Housetraining is a
huge job -- so don't feel bad that it can be overwhelming. But there is no easy way to succeed and no short cuts. You need to give her 100% until she starts to get it right, make sure your reinforce her ONLY in a positive way, and after awhile, she will make only occasional mistakes when the humans are not attentive enough.
She'll only learn as fast as you are able to give her your time to help her succeed, succeed and succeed again.