year函數(shù)的語(yǔ)法?
year = 2009 is_run_nian = 0 if year % 4 != 0: is_run_nian = 0 elif year % 4 == 0 and year % 100 != 0: is_run_nian = 1 elif year % 100 == 0 and year % 400 == 0: is_run_nian = 1 print is_run_nian
year函數(shù)的語(yǔ)法?
year = 2009 is_run_nian = 0 if year % 4 != 0: is_run_nian = 0 elif year % 4 == 0 and year % 100 != 0: is_run_nian = 1 elif year % 100 == 0 and year % 400 == 0: is_run_nian = 1 print is_run_nian