← Back to challenges

Lowercase, Uppercase or Mixed?

PythonMediumlanguage_fundamentalsstrings

Instructions

Create a function which returns "upper" if all the letters in a word are uppercase, "lower" if lowercase and "mixed" for any mix of the two.

Examples

get_case("whisper...") ➞ "lower"

get_case("SHOUT!") ➞ "upper"

get_case("Indoor Voice") ➞ "mixed"

Notes

Ignore punctuation, spaces and numbers.

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Number to Reversed Array