Write a program using functions to check whether a
number is even or odd. in python
Answers
Your solution is provided in attachemnt, check it out!
![](https://hi-static.z-dn.net/files/dd6/05edf6e1e83596c24fea54f271e30127.jpg)
![](https://hi-static.z-dn.net/files/d5a/45e5a691ba0bbabda6d89d51710993a5.jpg)
Answer:
Write a program using functions to check whether a
number is even or odd. in python
answer is :- program for the following question in python is given below;
number= int (input("enter a number "))
def numb():
if (number %2 == 0):
print("enter number is even")
else:
print ("enter number is odd")
res=numb()
Explanation:
In this programme, we take user input and store it in a variable called number. We then define a function called numb, and inside of this function, we use an if else conditional statement to check the condition. For example, to determine whether the input number is even, we check whether the remainder after dividing the number is equal to zero or not. If the remainder is zero, the statement "enter number is even" is printed; otherwise, the statement "enter number is odd" is printed.
To know about more click here,
brainly.in/question/18905944
To know about more click here,
brainly.in/question/16088081
#SPJ2