def max_num(num1, num2, num3): if num1 >= num2 and num1 >= num3: return num1 elif num2 >= num1 an [closed]

Solution 1:

You have an indentation issue. This way works:

def max_num(num1, num2, num3):
    if num1 >= num2 and num1 >= num3:
        return num1
    elif num2 >= num1 and num2 >= num3:
        return num2
    else:
        return num3

print(max_num(50, 265, 10))

See PEP 8 and Lexical analysis for more details.