You don't define a, so it doesn't exist. But that is far from the only issue with your code.
Also, why are you using j as a function? It is already used as the imaginary unit (even if you should use 1j instead of j), and it is often used as a loop variable.
You also forgot to explain what your function should do (either with explanatory text here, or in comments with your code) and you forgot to use the layout tools to make your question more readable.
After fixing the missing a, you should also have a look at your last block of code. The second line you're using the non-existant function imput, which I suspect is a typo and should be input instead. Then you proceed to use the function name as your loop iterator. Depending on your release this will either error, or cause unexpected behavior. Then you also proceed to overwrite the value entered by the user in m, as well as expanding it dynamically.
As the last point: your function doesn't return any outputs, so the calculations it does probably don't have any use, except keeping your computer busy.