Question:
Write a code for the function checkEvenOdd() using Python

Summary

We are considering the following example:


For Example

If x= 6

Output:

Even


If x=7

Output:

Odd


Let’s assume:

If the number is even function returns True or else False.


Solution

Here is the code:


#User function Template for python3


def checkOddEven(x):

    if(x % 2 == 0):

      # Complete the statement below

      return True

    else:

        # Complete the statement below

        return False


Answered by:> >piyushha4q7m

Credit:> >GeekforGeeks


Suggested blogs:

>How to configure python in jmeter?

>How to mock a constant value in Python?

>Creating a pivot table by 6 month interval rather than year

>How to Install mariaDB client efficiently inside docker?

>Can I call an API to find out the random seed in Python `hash()` function?

>How remove residual lines after merge two regions using Geopandas in python?


Submit
0 Answers

What Our Clients Say About Us

Client satisfaction is our ultimate goal. Here are some kind words of our precious clients they have used to express their satisfaction with our service.

Why Choose Us ?

We endow businesses with flexible engagement models based on their unique needs. Our strength lies in state-of-the-art technology and affordable consulting services. Try us for fast POCs, full-fledged applications, or technology consulting. Always available for your service.