Skip to content

Instantly share code, notes, and snippets.

@isaacaddis
Created November 23, 2015 23:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacaddis/2709e4b64294a33d33af to your computer and use it in GitHub Desktop.
Save isaacaddis/2709e4b64294a33d33af to your computer and use it in GitHub Desktop.
__author__ = 'Isaac'
def triSides():
a = int(input('Enter value for side A'))
b = int(input('Enter value for side B'))
c = int(input('Enter value for side C'))
if a + b <= c:
print('You cannot create a valid triangle.')
elif a + c <= b:
print('You cannot create a valid triangle.')
elif b + a <= c:
print('You cannot create a valid triangle.')
elif b + c <= a:
print('You cannot create a valid triangle.')
elif c + a <= b:
print('You cannot create a valid triangle.')
elif c + b <= a:
print('You cannot create a valid triangle.')
else:
print('Awesome! You can create a valid triangle!')
triSides()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment