Explain how L(g,P) = U(g,P) implies continuity of g. First, let $g$ be bounded on $[a,b]$. Now, assume $\exists P$, a partition, such that $L(g,P)=U(g,P)$.
I am told the correct answer to the question "describe $g$" is that $g$ is continuous on $[a,b]$. 
Yet, this confuses me. Since we are talking about Riemann integrability, wouldn't we exclude the case where $g$ simply has a finite number of discontinuities?
Lastly, do we know $g(x)=c$, a  constant?
Thank you in advance for any help!
I was asked for the exact definition of Lower and Upper Sum:
A partition $P$ of $[a,b]$ is a finite (we'll say it contains $n$ points) set of points from $[a,b]$ that includes both $a$ and $b$. The notational convention is to always list the points of a partition in increasing order. 
For each subinterval $[x_{k-1},x_k]$ of $P$, let
$m_k$ be the infimum of the subinterval. $M_k$ is the supremum of the subinterval.
The lower sum of $f$ with respect to $P$ is given by $L(f,P)=\sum\limits_{k=1}^nm_k(x_k-x_{k-1})$.
Similarly, the upper sum is:
$U(f,P)=\sum\limits_{k=1}^nM_k(x_k-x_{k-1})$.
 A: The thing is

For each subinterval $[x_{k-1},x_k]$ of $P$, let

that the closed subintervals of the partition are used to define $m_k$ and $M_k$, and each closed subinterval intersects its neighbours. If the open - or half-open - subintervals of the partition were used, $g$ could have discontinuities at the partition points, but using the closed subintervals rules that out.
To obtain the conclusion - that $g$ is in fact constant, not only continuous - compute
\begin{align}
0 &= U(g,P) - L(g,P)\\
&= \sum_{k = 1}^n M_k(x_k - x_{k-1}) - \sum_{k = 1}^n m_k (x_k - x_{k-1}) \\
&= \sum_{k = 1}^n (M_k - m_k)\cdot (x_k - x_{k-1})
\end{align}
and note that all terms are non-negative since $m_k \leqslant M_k$ and $x_{k-1} < x_k$ for all $k$. A sum of non-negative terms can only be $0$ if each term is $0$, and since $x_k - x_{k-1} > 0$, it must be that $m_k = M_k$ for every $k$. But that means $g$ is constant on each closed subinterval $[x_{k-1},x_k]$. And since neighbouring subintervals intersect, the value $g$ attains must be the same on all subintervals, i.e. $g$ is (globally) constant.
