I am sure I have followed the correct syntax for defining a function.The first few times I run the code,I get the final output.And then randmoly,when I run it ,I get the above error.I am not sure why this happens as I've gone through the help file so many times.This happens even when I switch...