Python program to check given number is even or odd using recursive

0
973
def check_even_odd(num):
    if (num < 2):
        return (num % 2 == 0)
    return (check_even_odd(num - 2))
num=int(input("Please enter a number: "))
if(check_even_odd(num)==True):
      print("Given number is even")
else:
      print("Given number is odd")

     Output 1:
             Please enter a number: 24
             Given number is even
     Output 2:
             Please enter a number: 31
             Given number is odd

इन्हें भी देखें।

Python Programs के लिये यहाँ click करें।

 

 

 

 

Python program to check given number is even or odd using recursive program to check given number is even or odd using recursive program to check given number is even or odd using recursive in python write a python program to check given number is even or odd using recursive program to check given number is even or odd in python using recursion program to check whether a number is even or odd using recursion in python program to check a number is even or odd using recursion program to check a number is even or odd using recursive program to check whether a number is even or odd in python using recursion program to check whether a number is even or odd in python using recursive write a program to check given number is even or odd using recursive write a program to check given number is even or odd using recursion program to check if a number is even or odd program to check if a number is even or odd in python write a program to check whether a number is even or odd write a program to check whether a number is even or odd using recursive write a program to check whether a number is even or odd using recursion write a program to check whether a number is even or odd in python write a python program to check given number is even or odd

LEAVE A REPLY

Please enter your comment!
Please enter your name here