Discussions Events Study Material Jobs
Check Leap Year or Not Using Python - Uniwaly

Explore Diverse Conversations

Check Leap Year or Not Using Python

Posted By: UmairMehmood Published On: 13 June 2025 At: 13:22 PM

Input a year and check if it's a leap year.

Leap year rule: divisible by 4, not divisible by 100 unless also divisible by 400

year = int(input("Enter a year: "))

if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
    print(f"{year} is a Leap Year.")
else:
    print(f"{year} is NOT a Leap Year.")


Tags:

python leap year or not python code
Login to like

Posted By:

Author Profile

UmairMehmood

11 days ago

Join the conversation!

Login to Comment

Discover More Articles

How to Attestation of Degrees/Diplomas/Certificates From HEC ?

Important Questions : Foreign Language Arabic

Government University and Collage Faisalabad ( GCUF ) Admission Criteria All Departments

Pakistan Bait ul Mal Jobs 2025 - Apply Now

Explain the interrelationship of language skills. How does the classroom environment affect them?

Afternoon Teaching Staff Hiring Process

Kazakhstan Government Scholarship - How to Apply ? - Complete Detail

Punjab Danish School New Jobs 2025 - Non Academic Staff Required

Why Google stopped showing the card of summary of your site's performance on Google Search ?

PPSC Jobs - Male and Female Assistant Registrar Cooperative Societies 2025