If my B.Sc.project contains source code, should I include it in an appendix?
Putting it into an appendix (maybe not in full but the core parts of it) seems the best solution. This is not only some sort of "proof of work" but gives examiners also an opportunity to assess whether the results generated by the code are indeed correct, so it helps with verifiability. This will be particularly important with code that generates numeric information, which you use to draw conclusions.

There are only very few cases where code should be put inline in the main body of the thesis, e.g. when you invented a new language or a new library and want to show how much easier / more readable / more concise / .. something can be formulated in your language / library and when this was indeed the main purpose of it.