Median - syntax error


#1

https://www.codecademy.com/courses/python-intermediate-en-rCQKw/2/5?curriculum_id=4f89dab3d788890003000096

hi folks. I dont understand why i'm getting a syntax error here. I'd appreciate it a lot if anyone could tell me why.
Thanks if you point out any other mistakes too.

def median(lst):
    order = (sorted(lst)
    
    b = len(order)
    if b % 2 != 0:
        return order[b/2]
    else: 
        c = order[(b/2 - 0.5)] + order[(b/2 + 0.5)]
        return c / 2 ```
    
console - ```  File "python", line 4
    b = len(order)
    ^
SyntaxError: invalid syntax

#2

look at your parentheses on the line above the error message


#3

thanks for the fast reply. After I fixed the parentheses I just had to add an int() tag and it worked <3


#4