One of my teachers once explained the difference between tact and politeness.
A man opens a bathroom door by mistake and sees a naked lady. He steps back and says
"Excuse me, madame."
The same man opens the bathroom door and finds the same naked lady and says
"Excuse me, sir."