Parity of Two Numbers
EasyP3Coding
Return "Even" if both numbers are even, "Odd" if both are odd, and "Even-Odd" if one is even and the other is odd.
Example 1
- Input
- a = 2, b = 4
- Output
- "Even"
Example 2
- Input
- a = 3, b = 5
- Output
- "Odd"
Example 3
- Input
- a = 2, b = 3
- Output
- "Even-Odd"
Constraints
- -10^9 <= a, b <= 10^9
Hints
Give it a real attempt first. Run shows which examples fail.
Saved automatically
Run checks the 3 visible tests, Submit all 8. ⌘Enter runs, ⌘⇧Enter submits.