# Python program to check number is even or not

Solution with out using functions
Solution using functions without passing arguments
Solution using functions and by passing arguments

### For better understanding of this example, one should have the knowledge of the following Python programming topics:

Python program to check number is even or not

```a=int(input("Enter any no "))
if(a%2==0):
print("Number is even")
else:
print("Number is not even")```

Output:

Enter any no 58
Number is even
>>>
Enter any no 97
Number is not even
>>>

### Solution : Using function Without Passing Arguments Program/Source Code

```#function definition
def even():
a=int(input("Enter any no "))
if(a%2==0):
print("Number is even")
else:
print("Number is not even")

#function calling
even()
```

Output:

Enter any no 20
Number is even
>>>
Enter any no 21
Number is not even
>>>

### Solution : Using function Passing Arguments Program/Source Code

```#function definition
def even(a):
if(a%2==0):
print("Number is even")
else:
print("Number is not even")

#function calling
a=int(input("Enter any no "))
even(a)
```

Output:

Enter any no 65
Number is not even
>>>
Enter any no 66
Number is even
>>>

### Interview Questions

C Programming
C++ Programming
Basic Python Tutorial