Triangle or not input (Python)

def is_a_triangle(a, b, c): return a + b > c and b + c > a and c + a > b a = float(input('Enter the first side\'s length: ')) b = float(input('Enter the second side\'s length: ')) c = float(input('Enter the third side\'s length: ')) if is_a_triangle(a, b, c): print('Yes, it can be a triangle.') else: print('No, it can\'t be a triangle.')

Comments

Popular posts from this blog

Email > routers

Operators in C language

3D printers