Question: Your task is to write the function number _ cardinality that takes an integer and returns a string, as follows: 1 . Return the string
Your task is to write the function numbercardinality that takes an integer and returns a string, as follows:
Return the string zero if the number ends in a
Return the string five if the number ends in a
Return the string even if the number is even divisible by
AND does not end with a
Return the string odd if the number is odd not divisible by
AND does not end with a
Please make sure your return string is exactly as above, using lowercase letters.
Note: the initial code in the editor uses tabs for indentation. Don't mix it with spaces.
Examples:
Input:
Output: zero
Input:
Output: even
Input:
Output five
Input:
Output: odd
For this test you're using Python
Feel free to add comments in your code explaining your solution.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
