Write A Python Function To Check Whether Three Given Numbers Can Form The Sides Of A Triangle

preview_player
Показать описание
Hi, In this video I tried to explain how to Write A Python Function To Check Whether Three Given Numbers Can Form The Sides Of A Triangle

Python Scripts
======================

Python Functions Solved
==========================

Python Programs Solved
============================

Code
==============
def check_triangle(a, b, c):
if a + b replace_this_with_greater_than_symbol c and a + c replace_this_with_greater_than_symbol b and c + b replace_this_with_greater_than_symbol a:
print("Triangle can be formed !")
else:
print("Triangle cannot be formed.")

x = int(input("Enter First Side of a Triangle : "))
y = int(input("Enter Second Side of a Triangle : "))
z = int(input("Enter Third Side of a Triangle : "))
check_triangle(x, y, z)

Keywords
=================
Write A Python Function To Check Whether Three Given Numbers Can Form The Sides Of A Triangle
Рекомендации по теме