Leap Year Program in Python


Prev Tutorial Next Tutorial

Leap Year Program in Python

Using if...else statement check year is divisible by 4 or not. If year is divisible by 4 it is leap year otherwise not leap year.

Leap Year Program in Python

year = int(input("Enter any Year: "))
if year%4==0:  
    print  "Year is Leap"  
else:  
    print "Year is not Leap"  

Output 1

	
Enter any year: 2000
Year is Leap

Output 2

	
Enter any year: 2005
Year is not Leap

Prev Tutorial Next Tutorial

Google Advertisements
Download Projects

Google Adsense Advertisements

Buy 3 Year Old Domain, Tutorialday.com, SeosmoTools.com @$200

Buy This Ad Space @$50 per Month, Ad Size 300X250 Contact on: hitesh.xc@gmail.com WhatsApp no. 8882538826

Yahoo Advertisements