Skip to content

Latest commit

 

History

History

Odd or Even

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Odd or Even? (Python)

Description

Your task is to write a Python function named is_odd_or_even(n: int) -> str that:

  • Takes an integer n as input.
  • Returns the string "Odd" if the number is odd, and "Even" if the number is even.

Example

For the input number 5, the function should return: Odd.

Hints

  1. Recall how you can use the modulo operation to determine if a number is divisible by another.

Constraints

  • The input integer n is in the range of -10^5 to 10^5.

Good luck, and happy coding!