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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -