project_python/2.2_lesson.18.20.py

23 lines
880 B
Python
Raw 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.

****Задание 18 Параграф 2.2***
***Остроугольный — вероятность встречи со злом крайне мала.
Тупоугольный — опасность велика.
Прямоугольный — вероятность 100%!
Напишите программу, которая определяет вероятность встретить зло по длинам сторон треугольника. Воспользуйтесь для этого составными условными операциями.***
if name == "main":
a = int(input())
b = int(input())
c = int(input())
maximum = max(a, b, c) ** 2 * 2
other = a ** 2 + b ** 2 + c ** 2
if maximum == other:
print('100%')
elif maximum > other:
print('велика')
else:
print('крайне мала')