← Back to challenges

Inches to Feet

PythonMediummathlanguage_fundamentals

Instructions

Create a function that accepts a measurement value in inches and returns the equivalent of the measurement value in feet.

Examples

inches_to_feet(324) ➞ 27

inches_to_feet(12) ➞ 1

inches_to_feet(36) ➞ 3

Notes

  • If inches are under 12, return 0.
  • 12 inches = 1 foot.
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: List From a Range of Numbers