Skip to content

Instantly share code, notes, and snippets.

@TranNgocMinh
Created February 5, 2018 06:26
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 TranNgocMinh/5b0940077dd1e44dd1718dcf4237383d to your computer and use it in GitHub Desktop.
Save TranNgocMinh/5b0940077dd1e44dd1718dcf4237383d to your computer and use it in GitHub Desktop.
isTriangle = True
OK = 'Y'
while True:
a = float(raw_input("Nhap a="))
b = float(raw_input("Nhap b="))
c = float(raw_input("Nhap c="))
if(a<=0 or b<=0 or c<=0):
isTriangle = False
if((a + b <= c) or (a + c <= b) or (b + c <= a)):
isTriangle = False
if(isTriangle):
print "Day la tam giac"
else:
print "Day khong phai la tam giac"
isTriangle = True
OK = raw_input("Ban muon tiep tuc khong?(Y/N)")
if(OK is 'N'):
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment