+ 3

Can it form a triangle?

How to develop a python program that reads the length of three lines and tells whether or not they can form a triangle?

24th Nov 2019, 1:28 AM
Leandro F Moraes
Leandro F Moraes - avatar
2 Antworten
+ 5
It is a geometric question. If every sum of length of two lines are bigger than third line, then it is possible to draw a triangle. Code is look like: A = float(input ()) B = float (input ()) C = float (input ()) If A+B > C and A+C> B and B + C > A: Print("It is possible") Else: Print ("Is is impossible")
24th Nov 2019, 1:45 AM
Олег Петришин
Олег Петришин - avatar
+ 4
Thanks
24th Nov 2019, 2:05 AM
Leandro F Moraes
Leandro F Moraes - avatar