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

Print All Even Numbers in a List using while loop in Python

National University of Computer and Emerging Sciences Admission Process

حکومت کی مارچ 2025 تک بجلی 12 روپے سستی کرنے کی تیاری جیو

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

Your Rights Online: How to Report and Delete AI-Generated Fake Content Featuring You

Visiting / Teaching Faculty Jobs in University of Veterinary and Animal Sciences Lahore 2025

Top 25 Must-Know Computer Keyboard Shortcuts to Boost Your Productivity

Understanding Anonymous Proxy Detection: Challenges, Implications, and Solutions

Content Writing Prompt Using ChatGPT and DeepSeek

Social Mobilizer - The Urban Unit Jobs 2025