Worst-case complexity in terms of n?
Let us interpret for i:=1 to n inclusively. That is, i will take values $1, 2, \cdots, n$.

Let us check how many operations are done in pesky(n).

r:=0: 1 assignment.

for i:=1 to n do:
$n$ assignments of i.

for j:=1 to i do: 
$\sum_{i=1}^ni=\dfrac{n(n+1)}2$ assignments of j.

for k:= j to i + j do: $\Sigma_{i=1}^n\Sigma_{j=1}^i(i+1)=\dfrac{n(n+1)(n+2)}3$ assignments of k.

r := r + 1: 
$\Sigma_{i=1}^n\Sigma_{j=1}^i(i+1)=\dfrac{n(n+1)(n+2)}3$ additions by 1.  $\dfrac{n(n+1)(n+2)}3$ assignments of $r$.

There are $1+n+\dfrac{n(n+1)}2+\dfrac{n(n+1)(n+2)}3\cdot2=\dfrac{(n+1)(n+2)(4n+3)}6$ assignments in total.

There are $\dfrac{n(n+1)(n+2)}3$ additions in total.

If we treat the computation cost of one assignment as that of one addition, we have $\dfrac{(n+1)(n+2)(4n+3)}6+\dfrac{n(n+1)(n+2)}3=\dfrac{n(n+1)(2n+1)}2$ operations.

That is answer. Note that it is a fixed number given $n$. That is, there is no distinction of best-case, worse-case or average-case.

Or is it? If we ignore over many important details, yes. However, let us take a close look. Does for i:=1 to n do involve assignment only? Mostly like not. We have to produce 1, 2, 3, $\cdots$, n in the first place. If we produce them by addition by 1, we have $n-1$ more additions. How do we make sure we will stop when $i$ reach $n$? Probably we have to compare i with n for about $n$ times. Comparison takes time of course. We should include that cost. Wait, there is more. It is unreasonable to expect that $n$ is in the right position to be compared with $i$; We have to fetch $n$ from somewhere so that we can compare it with $i$. Now, we are not even sure how to describe that fetching and its computational cost. There are, in fact, many more important details that could be taken into consideration.

You might be wondering now. Do we have an answer or not? Yes and no. 


Yes, we have an answer, assuming some assumptions. I will not be surprised that your instructor might come up with a different number of operations under a different set of assumptions, though.
No, the answer cannot stand up to scrutiny in many situations. That is one of the reasons why we use the big $O$-notations. We can say the computation cost is $\Theta(n^3)$ under a set of very general assumptions (a.k.a. model of computation). 


By the way, if you check what I had written before, you will notice and understand that I have been rather careful, saying that I am only computing how many times the innermost iteration are executed. In general, the asymptotic time complexity of a nested loop is determined by the product of that number with the average cost of one innermost iteration. 



Here is a similar exercise for you to practice.

Exercise. Express the best-time complexity of the following function in terms of $n$ instead of in big $O$-notation. Only the operation r := r + 1 is counted. 

function pesky2(n)
  r := 0
  for i := 1 to n do
    for j := 1 to i do
      for k := 1 to j do
        r := r + 1

  return r