I want the function to take input and process it-- python code -
output "for code process finished exit code 0" want either true or false
def is_tri(p,q,r): # function lengths values of triangle if(p>(q+r)): return "false" elif(q>(p+r)): return "false" elif(r>(p+q)): return "false" else: return "true" p = int(input("enter first side length: ")) q = int(input("enter second side length: ")) r = int(input("enter`enter code here` third side length: ")) is_tri(p,q,r)
exit code 0
means process has finished without error. status can integer, else 0
means went wrong. in order print true
or false
following:
print(is_tri(p, q, r))
Comments
Post a Comment