有人知道这些问题怎么解决吗?

刚开始学 尝试进行函数撰写
def calculator(a, operation, b):
operation = "+" or "-" or "/" or "*"
if operation == "/" and b == 0:
    return "cannot divide by zero”)
else operation not == "+" or "-" or "/" or "*"
    return "Operation not recognized"
第四行还是报错 EOL while scanning string literal
写一个叫calculator(a, operation, b)的函数,它有三个参数,a和b是数字,operation是数学运算“+”,“-”,“*”和“/”中的一个。函数应该使用给定的数字和操作返回计算的答案。如果操作为“/”且b = 0,则函数应返回“cannot divide by zero”。否则,如果operation不是四个数学操作之一,则函数应返回“operation not recognized”。

def calculator(a, operation, b):
    # operation = "+" or "-" or "/" or "*"
    if operation == "/" and b == 0:
        return "cannot divide by zero"
    elif operation not in ["+","-", "/","*"]:
        return "Operation not recognized"
    else:
        if operation == "/":
            return a/b
        elif operation =='*':
            return a*b
        elif operation == '+':
            return a+b
        else:
            return a-b

print(calculator(1, "/", 0))
print(calculator(1, "+", 2))
print(calculator(1, "-", 2))
print(calculator(1, "*", 2))
print(calculator(1, "/", 2))
print(calculator(1, "/,", 2))

你可以先学习一些python基础再来试着写函数,对基础的内容有些了解,才能理解函数的意义
拿这个来说,起码要知道参数传参,if的用法,函数返回值的写法等等,我都不知道怎么评价了,好多错误😂