Given a positive integer N, determine whether it is odd or even.
 
Example 1:
Input:
N = 1
Output:
odd
Explanation:
The output is self-
explanatory.
 
Example 2:
Input:
N = 2
Output:
even
Explanation:
The output is self-
explanatory.
 
Your Task:
You don't need to read input or print anything. Your task is to complete the function oddEven() which takes the integer N and return "even" is number is even and "odd" if the number is odd.
 
Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)
 
Constraints:
0 <= N <= 10000

Source: geeksforgeeks | Difficulty: EASY
Tags: Bit manipulation

Data structures

Mathematics

Starter code: #User function Template for python3

class Solution:

    def oddEven (ob,N):

        # code here 

Solutions:
class Solution:

	def oddEven(ob, N):
		if N & 1 == 0:
			return 'even'
		return 'odd'


class Solution:

	def oddEven(ob, N):
		res = N & 1
		if not res:
			return 'even'
		return 'odd'


class Solution:

	def oddEven(ob, N):
		return 'odd' if N & 1 else 'even'


class Solution:

	def oddEven(ob, N):
		if N % 2 == 0:
			return 'even'
		else:
			return 'odd'


class Solution:

	def oddEven(ob, n):
		if n & 1:
			return 'odd'
		else:
			return 'even'


class Solution:

	def oddEven(ob, N):
		for i in range(N):
			if N % 2 == 0:
				e = str('even')
				return e
			else:
				e = str('odd')
				return e