K
K
khusgsksbml2020-05-14 14:22:49
Python
khusgsksbml, 2020-05-14 14:22:49

Why is SyntaxError: invalid syntax coming out?

from math import sqrt 
π=3.14
t = str(input('Введите тип комнаты:'))
if t == 'треугольник':
    a = int(input('Введите длину стены 1:'))
    b = int(input('Введите длину стены 2:'))
    c = int(input('Введите длину стены 3:'))
    p=((a+b+c)//2)
    print (sqrt(p*(p-a)*(p-b)*(p-c)))

if t == 'прямоугольник':
    a = int(input('Введите длину стены 1:'))
    b = int(input('Введите длину стены 2:'))
    print(a*b)
if t == 'круг':
    r = int(input('Введите радиус:')
            print (3.14*(r ** 2))


File "jailed_code", line 18
    print (3.14*(r ** 2))
        ^
SyntaxError: invalid syntax

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2020-05-14
@khusgsksbml

In the previous line, the closing brace is missing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question