Copying and running the code results in syntax error.
So in order to get the code you’re really asking about, there’s guessing involved.
Gotta enable others to see the same thing.
Oh, after glancing at it, maybe it doesn’t, still, since the forum is allowed to apply formatting rules to it, I don’t trust it. If there’s any other code involved required to reproduce what you describe, then that’s still missing.
But if you want some kind of result from your function, then you’d probably call it, and then print out the result? And to call it you would first need input, so you’d define some input, call it, print the result.
What does work mean?
Maybe that’s where you’d continue. What was different from what you expected?
In some sense programming is about lining up events to get from where you start to where you want to be. It is to take control of every detail from start to finish. If it’s not working then the way to continue is to start comparing what should have happened to what does happen.
Perhaps you might start with writing a hello world program that does nothing but print out a greeting, and modify that a small piece at a time until you get to the result that you’re looking for?
If the problem is that you’re not getting anything to show on the screen then a hello world program is a good starting point since it does exactly that. From there you’d modify it to print out a different message based on the result of your function, not a big change, but that small change is probably already puts it very close to whatever you’re expecting to happen.
Getting anywhere with that?
If you know how to write a hello world program, and you know how to write if-statements, and you know how to call your function, and you know how to define input for your function… Then is it reasonable to say that you also know how to get some kind of result from your function onto the screen? If not, and you very well might not, then maybe you’re able to say which of those things (or any other thing that stopped you) you don’t know how to do, and that’s a whole lot of progress, because then you know what information you’re missing.