y=input("Please enter the year:")
if y%4==0
and
y%100!=0
or
y%400==0:
print y,"
是闰年
"
else:
print y,"
不是闰年
"
3
、
输入一个学生的成绩,如果是
90
分以上,打印出“
A
”的评语;
80
分以上的,打印出“
B
”;
70
分以上的,打印出
“
C
”;
60
分以上的,打印出“
D
”;不及格的打印出”
E
”。
print "This is a procedure which can print the mark related to your score. The range of your score is 0~100."
x=input("Please enter your score:")
while True:
if x<0 or x>100:
x=input("Wrong input, the range is 0~100. Please enter again:")
if 90
print "A"
break
if 80
print "B"
break
if 70
print "C"
break
if 60
print "D"
break
if 0<=x<60:
print "E"
break