会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
月光边境Eric
博客园
首页
新随笔
联系
管理
订阅
2016年11月17日
py教程第5讲:解决闰年问题----input()的返回值始终是字符串
摘要: temp = input('请输入年份:') while not isinstance(temp, int): temp = input('抱歉,您的输入有误,请输入年份:') year = int(temp) if year % 400 == 0: print('%d是闰年!'%(year)) e
阅读全文
posted @ 2016-11-17 11:02 月光边境Eric
阅读(392)
评论(0)
推荐(0)
编辑
公告