This is the problem with simply copying and pasting spoonfed answers. You have to understand what's actually going on if you have any hope of writing code.

You've actually copied from two...