← Back to challenges

Highest Digit

PythonMediumnumberslanguage_fundamentals

Instructions

Create a function that takes a number as an argument and returns the highest digit in that number.

Examples

highest_digit(379) ➞ 9

highest_digit(2) ➞ 2

highest_digit(377401) ➞ 7
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Cowboy Shootout