输入:
A = float(input("Enter the first number: "))
B = float(input("Enter the second number: "))
C = input("Enter the operator: ")
if C == "+":
Sum1 = A+B
print(A,"+",B,"=",round(Sum1,1))
elif C =="-":
Sum2 = A-B
print(A,"-",B,"=",round(Sum2,1))
elif C == "":
Sum3 = AB
print(A,"*",B,"=",round(Sum3,1))
elif C == "/":
Sum4 = A/B
print=(A,"/",B,"=",round(Sum4,1))
else:
print("Operator not supported.")
print=(A,"/",B,"=",round(Sum4,1))
你自己看不出来多了个等号吗
print=(A,"/",B,"=",round(Sum4,1))
print这里多了个=