# Python program to check number is odd 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 odd or not

```a=int(input("Enter any no "))
if(a%2==1): #or if(a%2==1):
print("Number is odd")
else:
print("Number is not odd")```

Output:

Enter any no 62
Number is not odd
>>>
Enter any no 95
Number is odd
>>>

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

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

#function calling
odd()
```

Output:

Enter any no 21
Number is odd
>>>

Enter any no 28
Number is not odd
>>>

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

```#function definition
def odd(a):
if(a%2==1): #or if(a%2==1):
print("Number is odd")
else:
print("Number is not odd")

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

Output:

Enter any no 95
Number is odd
>>>
Enter any no 902
Number is not odd
>>>

### Interview Questions

C Programming
C++ Programming
Basic Python Tutorial