Dec-09-2016, 01:40 AM
"""
Create a function called
would:
 1. Cause the program to exit, setting the return code to the value passed
  as an argument
 2. When inspected, would return the following help string:
  Exits the program with the specified returncode
For example:
 returncode(10) ->
 # Process terminates with return code of 10
"""
Create a function called
returncode
, taking a single integer argument thatwould:
 1. Cause the program to exit, setting the return code to the value passed
  as an argument
 2. When inspected, would return the following help string:
  Exits the program with the specified returncode
For example:
 returncode(10) ->
 # Process terminates with return code of 10
"""
import sys def returncode(b): Â Â """ Exits the program with the specified returncode""" Â Â sys.exit(b) Â Â """sys.exit('# Process terminates with return code of %s'%(b))""" b = 10 returncode(b)What is wrong in this...Is there a better way of doing this