Help!

I purchased my 2001 Nissan Sentra about 4 weeks ago and the check engine light came on about a week into owning it. I scheduled an appointment to get it checked, but continued to drive it without issue until one day I started it and as soon as I began driving it lost power. The more gas I gave it, the worse it got. It just wouldn’t let me go anywhere. So I parked the car and let it sit for about an hour. Then when I went back to show someone else the problem, the car started and drove again like nothing was wrong. Since then, this has been happening frequently. I will start the car, it will spit and sputter and lose power, I will turn the car off and wait a while, it will start up again no problem. My local mechanic told me the computer was throwing a bunch of different codes, including the one for the catalytic converters. They also told me that since the problem seems electrical (the car seems to reset itself when I turn it off) it could be that the computer is going and that’s what needs to be replaced.
I’ve taken the car back to the dealership where I bought it, they replaced the oxygen sensors, thinking that would fix the problem. I just got the car back yesterday and drove it for about 60 miles without any problems, then that check engine light came back on and the same old problem is back. My question is, how do I know if the problem is mechanical or electrical? What if I replace the catalytic converters when it’s actually the computer that was the problem all along or vice versa?

i think its time for a nissian master tech dosn’t have to be a dealer but that might be wat you need to find out whats up with your
Sentra

I would definitely get a second opinion, as marc recommends before the expense of the catalytic convertor. It could be something as simple, though not cheap as a pickup sock in the tank getting clogged. Run some sea foam or techron through it just for kicks.