题型:综合题 题类:常考题 难易度:普通
浙江省绍兴市海亮高级中学2020-2021学年高一下学期信息技术期中考试试卷
day=input("请输入年月日(格式举例:2000-01-05):")
year=int(day[:4])
month= ①
sun=int(day[8:10])
print(year,month,sun)
f_run=[31,28,31,30,31,30,31,31,30,31,30,31]
tall_day=0
if ② :
for i in range(month-1):
tall_day +=f_run[i]
③
else:
for i in range(month-1):
tall_day +=f_run[i]
tall_day += sun
print(day+"是当年的第"+str(tall_day)+"天")
① ② ③
试题篮