python判断是否是闰年
判断给的年是否是闰年!1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python
ye = int(raw_input('Please enter the year:'))
if ye % 100 == 0:
if (ye/100) % 4 == 0:
print "your inputing is a leap year!"
else:
print "your inputing is not a leap year!"
elif ye % 4 == 0:
print "your inputing is a leap year!"
else:
print "your inputing is not a leap year!"
页:
[1]