Here's a breakdown:
* Sim: Means "yes"
* Senhora: Means "madam" or "ma'am"
You can also use "Sim, dona" which is slightly less formal than "senhora".
It's important to note that "ma'am" is used to address a woman who is older than you or in a position of authority. In some situations, you might use a more casual term like "sim" alone, but "sim, senhora" is always a safe and respectful option.