09-06-2021, 04:37 PM
I recently upgraded my Prime to the latest firmware and I'm trying to understand how to write python functions/scripts. I didn't seem to find much a solution while perusing older threads.
Let's say my script looks like this:
I know this is a contrived example, but I just want to know how to make it work. The question is, how do I call func3 ?
Let's say my script looks like this:
PHP Code:
def func1(a, b):
return a + b
def func2(a, b):
return a - b
def func3(a, b, c):
if c == 0:
return func1(a, b)
else:
return func2(a, b)
I know this is a contrived example, but I just want to know how to make it work. The question is, how do I call func3 ?