project_python/2.2_lesson.12.20.py

16 lines
793 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

****Задание 12 Параграф 2.2***
***Вася обожает треугольники и решил попробовать сделать один самостоятельно.
У него есть несколько алюминиевых трубочек разной длины, и он хочет узнать, можно ли из них собрать треугольник.
Помогите Васе определить, можно ли из трёх данных отрезков создать треугольник.***
if name == "main":
first = int(input())
second = int(input())
third = int(input())
isit = first < second + third and second < first + third and third < first + second
if isit:
print('YES')
else:
print('NO')