Question: Write a robust and well-documented (commented) program that asks for two non-negative integers and returns the result of integer division of the two numbers entered.

Write a robust and well-documented (commented) program that asks for two non-negative integers and returns the result of integer division of the two numbers entered. Use Pythons try/except mechanism to catch and print the following errors. If the user enters 0 for the second integer, then print out an error message Division by Zero. If the user enters anything other than non-negative integer values, then print out an error message You did not enter a non-negative integer. A sample run would be as follows. Enter a non-negative integer: five Enter another non-negative integer: 5 You did not enter non-negative integer(s). Try again. Enter a non-negative integer: 5 Enter another non-negative integer: 0 Division by Zero. Try again. Enter a non-negative integer: 5 Enter another non-negative integer: 2 The result of integer division is 2.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!