Question 19
Examine the following Python code snippet.
File: logger_test.py
import loggingimport sys
logging.basicConfig(level=logging.WARNING, format='%(asctime)s - %(levelname)s - %(message)s')
def process_data(num): logging.debug("Starting data processing") logging.info("Processing number: %d", num)
if num == 0: logging.warning("Zero value detected - potential division by zero") return None elif num < 0: logging.error("Negative number provided: %d", num) return None else: result = 100 / num logging.info("Calculation completed successfully") return result
try: input_num = int(sys.argv[1]) result = process_data(input_num) if result: print(f"Result: {result}")except IndexError: logging.critical("No command line argument provided")except ValueError: logging.error("Invalid input - not a number")What will be the output when running the command: python logger_test.py -5 ?