Created
February 5, 2018 06:26
-
-
Save TranNgocMinh/5b0940077dd1e44dd1718dcf4237383d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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