To add more to your confusion: The word أستاذة is used by Duolingo to mean "professor (f.)"
does mean professor.
if you want a better/different word for ma'am, you can say سَيِّدة.? I have heard أستاذة used outside of school though.
I didn't type a question mark and I don't know where that is coming from. I don't know how to manage right and left justified text in the same paragraph.