Hey @Mostafa_Khedr,
Welcome to the community. As the error makes it very obvious, you are not supposed to use any global variables inside your functions’ implementations, unless and until it’s been explicitly stated to do so. Please ensure that you have used the arguments passed into the functions, instead of their corresponding global variables. I hope this helps.
Hey @Mostafa_Khedr,
In that case, please DM me your notebook as an attachment, so that we can figure out the error, which is not possible from this error message.