U
U
Userame2020-05-30 19:52:27
Python
Userame, 2020-05-30 19:52:27

Invalid syntax, I'm a beginner, it's immediately clear. Can you help?

Syntax error I can't understand its meaning and how to fix it.

t=input()
if t == "треугольник":
    a=int(input())
    b=int(input())
    c=int(input())
    p=(a+b+c)/2
    print(p*(p-a)*(p-b)*(p-c)
elif t == "круг":
    r=int(input())
    F=3.14*r**2
        print(F)
elif t == "прямоугольник":
    a=int(input())
    b=int(input())
        print(a*b)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Gornostaev, 2020-05-30
@Userame

5e1ff0ac066b9696317852.jpeg

N
Nikcet, 2020-05-30
@Nikcet

An extra tab is also a mistake. It's like putting an open parenthesis outside the closing parenthesis of a condition in another language.
And in the 7th line, as mentioned above, the bracket is missing.

A
Andrey_Dolg, 2020-05-31
@Andrey_Dolg

Well, the idea of ​​a bot to send one comment to everyone, it's funny, but can you still remove such functionality?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question