How would you address your teacher if he/she is the same age as you? Is there any difference from if the teacher is older?
If you called him or her você, would they feel uncomfortable? If you called them "o senhor/a senhora", would they feel uncomfortable?
This may be obvious to most of you, but coming from a language that doesn't use polite/familiar address at all (Swedish), these situations make me want to assess every situation for itself. I really try to watch my tongue and still sometimes forget the formal address. Sometimes the choices make me insecure because calling a person of my age the Swedish equivalence of "o senhor" (=Ni) would be considered sarcastic, outright crazy or almost unpolite in all its weirdness. It would certainly make the other person feel uncomfortable, which is definitely not my intention.
Adeus e muito obrigada :)
Addressing someone as "o senhor"/"a senhora" is almost restricted to elderly people, even though the term can be used in more formal situations.
Of course, as you're a learner, I don't think anyone would feel uncomfortable or offended if you used a "less apropriate" form. I wouldn't, but I'd think it's funny and kindly ask you to call me "você "
Portuguese people are nice!
Of course some people don't understand the hardships of learning, but most people do and will probably even feel flattered with your efforts.
I don't have much experience with European Portuguese, but as mentioned by others, you can use "the mirror technique" or ask.
If you ever decide to learn Brazilian Portuguese, it's does have more of an informal vibe to it, doesn't it? I am sure the community will be happy to help!
I assume you're referring to a Brazilian Portuguese teacher?
Allie explained it very well. As a rule, you should use "você."
The use of senhora/senhor is exceptional:
1. for the elderly (and many elders prefer to be addressed with você, which they will tell you themselves, if it's the case)
2. also for some professional settings. (Lawyers and judges, politicians, policemen, scholars...)
It's very different in Portugal. I'm not sure but I think there they use tu for informal situations and você is the polite form. But don't worry, I believe they are quite used to Brazilian there.