Solution
The Module command can be used to wrap a set of commands into a single function. The first argument is the declaration of any possible local variables.
In[55]:=
Out[57]=