As long as y is defined (like you assigned something to y before you called the function) then that line
should work. However you didn't give the entire error message. You gave the line the error occurred on but not the actual error description. Why not? You need to include all the red text, not just some of it.
By the way you need to assign something for y, you can't just click the green Run triangle on the toolbar without assigning all the input variables.