Covariance Matrix calculation

I am stuck up at the covariance matrix calculation.

The first lesson calculate from the return_quarterly dataset witch is calculated from the dataset.pct_change().

But the next lesson calculate the matrix directly from the prices without using pct_change() function .
Witch calculation is right? Or can we choose both?