What will be the output after the following code is executed and the user enters 75 and 0 at the first two prompts?

13.What will be the output after the following code is executed and the user enters75and-5at the first twoprompts?def main():try:total = int(input("Enter total cost of items? "))num_items = int(input("Number of items "))average = total / num_itemsexcept ZeroDivisionError:print('ERROR: cannot have 0 items')except ValueError:print('ERROR: number of items cannot be negative')main()a.ERROR: cannot have 0 itemsb.ERROR: cannot have 0 itemsERROR: number of items can't be negativec.ERROR: number of items can't be negatived.Nothing; there is noprintstatement to displayaverage. TheValueErrorwill notcatch the error.ANS:

Recommended textbooks for you

  • What will be the output after the following code is executed and the user enters 75 and 0 at the first two prompts?

    Computer Networking: A Top-Down Approach (7th Edi...

    Author:James Kurose, Keith Ross

    What will be the output after the following code is executed and the user enters 75 and 0 at the first two prompts?

    Computer Organization and Design MIPS Edition, Fi...

    Author:David A. Patterson, John L. Hennessy

    Publisher:Elsevier Science

    What will be the output after the following code is executed and the user enters 75 and 0 at the first two prompts?

    Network+ Guide to Networks (MindTap Course List)

    Author:Jill West, Tamara Dean, Jean Andrews

    Publisher:Cengage Learning

  • What will be the output after the following code is executed and the user enters 75 and 0 at the first two prompts?

    Concepts of Database Management

    Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last

    Publisher:Cengage Learning

    What will be the output after the following code is executed and the user enters 75 and 0 at the first two prompts?

    Prelude to Programming

    Publisher:Pearson Education

    What will be the output after the following code is executed and the user enters 75 and 0 at the first two prompts?

    Sc Business Data Communications and Networking, T...

  • What will be the output after the following code is executed and the user enters 75 and 0 at the first two prompts?

    Computer Networking: A Top-Down Approach (7th Edi...

    ISBN:9780133594140

    Author:James Kurose, Keith Ross

    Publisher:PEARSON

    What will be the output after the following code is executed and the user enters 75 and 0 at the first two prompts?

    Computer Organization and Design MIPS Edition, Fi...

    ISBN:9780124077263

    Author:David A. Patterson, John L. Hennessy

    Publisher:Elsevier Science

    What will be the output after the following code is executed and the user enters 75 and 0 at the first two prompts?

    Network+ Guide to Networks (MindTap Course List)

    ISBN:9781337569330

    Author:Jill West, Tamara Dean, Jean Andrews

    Publisher:Cengage Learning

    What will be the output after the following code is executed and the user enters 75 and 0 at the first two prompts?

    Concepts of Database Management

    ISBN:9781337093422

    Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last

    Publisher:Cengage Learning

    What will be the output after the following code is executed and the user enters 75 and 0 at the first two prompts?

    Prelude to Programming

    ISBN:9780133750423

    Author:VENIT, Stewart

    Publisher:Pearson Education

    What will be the output after the following code is executed and the user enters 75 and 0 at the first two prompts?

    Sc Business Data Communications and Networking, T...

    ISBN:9781119368830

    Author:FITZGERALD

    Publisher:WILEY