Loading...

The Exception Handler

A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
medium
Seniority
junior, mid

Problem

Write a function that takes a list of operations, each specifying a division (numerator and denominator). For each operation, return the result if valid or an appropriate error message string if dividing by zero or if inputs are non-numeric. Return a list of results in order.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.