What will be the output after the following code is executed…
What will be the output after the following code is executed and the user enters 75 and -5 at the first two prompts?try: tot_cost = float(input(‘Enter total cost of items: ‘)) num_items = int(input(‘Enter number of items: ‘)) avg_cost = tot_cost / num_items except ZeroDivisionError: print(‘ERROR: Number of items cannot be zero!’) except ValueError: print(‘ERROR: Number of items cannot be negative!’) else: print(‘There were no run-time errors!’) finally: print(‘We are finally done with this!’)
Read Details