Does word "term" have the same meaning in the following two sentences?

He left school before the end of term.

He was sentenced to a term of six years in prison.
the same meaning