วันจันทร์ที่ 14 กันยายน พ.ศ. 2558

Lab 4x : Leap Year

def setup():
   year = 2012
   if(year%4==0 or year%4==0 and year%100!=0 or year%4==0 and year%100==0 and year%400==0):
      print("Year's Leap Year")
   if(year%4!=0 or year%4==0 and year%100==0 or year%4==0 and year%100==0 and year%400!=0):
      print("Year isn't Leap Year")
   
   
setup()

ไม่มีความคิดเห็น:

แสดงความคิดเห็น