Your suggestions worked.
Perfect - thanks!
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Your suggestions worked.
Perfect - thanks!
Hi,
I am new to python, and I am learning to program on the mac using Sublime Text and Pythonista on the iPad. The code below executes on the mac with no issues, but on the iPad, I get an "invalid syntax" on line 19.
Line 19: print median (1,3,2) is the output of the program.
Is there a different way to getting the output of this program with Pythonista?
Thanks for your help in advance.
Clarence.
def bigger(a,b):
if a > b:
return a
else:
return b
def biggest(a,b,c):
return bigger(a,bigger(b,c))
def median(a,b,c):
big = biggest(a,b,c)
if big == a:
return bigger(b,c)
if big == b:
return bigger(a,c)
else:
return bigger (a,b)
print median (1,3,2)