[Solved] Write a program that prompts the user to enter two integers user_num (dividend) and div_num (divisor) as input
Write a program that prompts the user to enter two integers user_num (dividend) and div_num (divisor) as input, and outputs the quotient (user_num divided by div_num – use the integer division operator). Use a try block to perform all the statements. Use an except block to catch any ZeroDivisionError and output an exception message. Use another except block to catch any ValueError caused by invalid input and output an exception message.
Note: ZeroDivisionError is thrown when a division by zero happens. ValueError is thrown when a user enters a value of different data type than what is defined in the program.”
Example program runs:
Expert Answer
Answer to Write a program that prompts the user to enter two integers user_num (dividend) and div_num (divisor) as input…..
OR