I walked into the principal's office to change my grades
That's not the right thing to do. Why would you go to the principal's office?
I would do that in prison too.
You can get in big trouble for breaking into someone's office like that. You need to learn how to study harder if you want better grades.
I'm feeling better since my grades went up.
Those aren't your real grades though and you cheated. It's wrong to break into places like that and you could get into trouble for trespassing.