Can anyone check my code for defining a function, please? Thank you!

My task was:


The solution proposed by DQ looks like this:

However, I wanted to sort churned or not by defining a new function
But y code didn’t work
Can anyone check and tell me what’s wrong with function I created, please?

Thank you!

just a quick note i see you dont have any parameters defined in your function ? also your function does not return anything ?

Hi @kdilrabo2911, Kindly provide the full error message. Thanks