Check Given number add or even
add or even
Hi Friends...
Welcome today...
I coded for given number is odd or even
It is very simplest program compared to previous coded.
okay let's start...
CODE:
Welcome today...
I coded for given number is odd or even
It is very simplest program compared to previous coded.
okay let's start...
CODE:
try:
a = int(input('Enter any number: '))
if a > 0:
if a % 2 == 0:
print(f'{a} is a even number')
else:
print(f'{a} is a odd number')
except:
print('Invalid input')
----
By
PyKAR
PyKAR
Comments
Post a Comment