Handle Invalid Density Inputs

Write safe_density(mass, volume). Return mass divided by volume; use try/except to return None when the input types cannot be divided or volume is zero.

Examples

  • [12,3]4

Your solution

Python

Results

Python starts when you run or submit this challenge.

Back to Lesson