Yes but it's a little harder to prove that the algorithm you've described works.
I personally avoid using a word "proof" to mean anything other than a mathematical proof. It can be done with code, for sure, but as grandparent said, usually isn't.
And there is such a thing as a correct implementation of an algorithm. Running it does not exactly prove things either, and it might not necessarily work on actual hardware, but it does show that the person understands at least part of the material.