Loading...
Loading...
Loading...
Ticket numbers ending in an even digit go to desk A, the others to desk B. Write parity(n) that returns Even or Odd, then print the result for the number n.
Even or Odd.Example 1
Input
10
Output
Even
Ten divides by 2.
Example 2
Input
7
Output
Odd
Try the problem first. Open one hint at a time.
A number is even when the remainder after dividing by 2 is 0.
Return a string from each branch.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor