← Back to challenges

Chinese Zodiac

PythonHardconditionsarrayslanguage_fundamentals

Instructions

Create a function that takes a year as an argument and returns the corresponding Chinese zodiac.

Examples

chinese_zodiac(2021) ➞ "Ox"

chinese_zodiac(2020) ➞ "Rat"

chinese_zodiac(1933) ➞ "Rooster"
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Sum of Found Indexes