FishHook
Ввот доделаный код:
a=float(input('Первое число: ‘))
b=str(input(’Знак: ‘))
c=float(input(’Второе число: ‘))
e=str(input(’Знак или пробел: ‘))
d=float(input(’Третье число: ‘))
if b in (’+','-','*','/') and e in ('+','-','*','/',' ‘):
if b in (’+','-','/','*') and e==' ‘:
if b==’+':
print(a+c)
elif b=='-':
print(a-c)
elif b=='*':
print(a*c)
elif b=='/':
print(a/c)
elif b=='**':
print(a**c)
elif b=='//':
print(a//c)
elif b in ('+','-','/','*','**','//') and e in ('+','-','/','*','**','//'):
if b=='+':
if e=='+':
print(a+c+d)
elif e=='-':
print(a+c-d)
elif e=='*':
print(a+c*d)
elif e=='/':
print(a+c/d)
elif b=='-':
if e=='+':
print(a-c+d)
if e=='-':
print(a-c-d)
if e=='*':
print(a-c*d)
if e=='/':
print(a-c/d)
elif b=='*':
if e=='+':
print(a*c+d)
if e=='-':
print(a*c-d)
if e=='*':
print(a*c*d)
if e=='/':
print(a*c/d)
elif b=='/':
if e=='+':
print(a/c+d)
if e=='-':
print(a/c-d)
if e=='*':
print(a/c*d)
if e=='/':
print(a/c/d)
else:
print('Знак неверный!')