关于Python运算的一点问题

我有好多细节出错呀,在输入那里,请大佬们指点一下

img

哈哈哈,我怎么觉得刚刚就是你啊...不少细节问题的。


cmd_str = input("")
try:
    print(cmd_str,"=",eval(cmd_str))
except:
    print("Invaild Operator")

inputList=input().split() 

a = inputList[0]
op = inputList[1]
b = inputList[2]

a = int(a)
b = int(b)

if op == '*':
    print("a*b="+str(a*b)) 
elif op == '/':
    print("a/b="+str(a/b))
elif op == '%':
    print("a%%b="+str(a%b))
else:
    print("Invalidoperator")