What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-23 12:58:10
python list for all months including leap years
# A function to determine if a year is a leap year. # Do not change this function. def is_leap_year(year): return (year % 4 == 0) and (year % 100 != 0) or (year % 400 == 0) # You should complete the definition of this function: def days_in_month(mon... Add solution -
PHP 2021-10-12 06:07:06
How to check leap year in php?
$year = 2014; // Leap years are divisible by 400 or by 4 but not 100 if(($year % 400 == 0) || (($year % 100 == 0) && ($year % 4 == 0))){ echo "$year is a leap year."; } else{ echo "$year is normal year."; } Add solution
Best helpers
Zack Marotta
+5
Key_asdfg
+5
Hi-yi
+5
Zhak Maarli
+5
Nitesh
+5
Miky
+5
Moji Moji
+5
Steve Bowman
+5
Sunrise Moon
+5