Check the given number is even or odd using if statement in python
number =int(input("Enter a number :")) if(number %2 == 0): print("The given number is Even") else: print("The given number is Odd")To download raw file Click Here
Enter a number :7 The given number is Odd
year =int(input("Enter a year: ")) if(year % 4 == 0): print("The given year is leap year") else: print("The given year is not a leap year")To download raw file Click Here
Enter a year: 2002 The given year is not a leap year
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions