Python实现日历查询
来源:互联网 发布:数据分级 英语 编辑:程序博客网 时间:2024/04/30 14:05
# -*- coding:utf-8 -*-import timeimport calendarimport datetimewhile True: print "********主菜单********" print "* 欢迎进入万年历系统 *" print "* 1.年历显示 *" print "* 2.月历显示 *" print "* 3.日期查询 *" print "* 4.退出系统 *" while True: try: choice=input(u"请输入想要查询的内容") except SyntaxError: print u"请重新输入!" else: break if(choice==1): Year=input(u"请输入您想要查询的年份") for i in range(1,13): cal = calendar.month(Year, i) print cal if(choice==2): Year= input(u"请输入您要查询的年份") Month=input(u"请输入您要查询的月份") Day = input(u"请输入您要查询的天数") cal = calendar.month(Year, Month) print u"以下输出"+str(Year)+u"年"+str(Month)+u"月份的日历:" print cal; if(choice==3): Year= input(u"请输入您要查询的年份") Month=input(u"请输入您要查询的月份") Day = input(u"请输入您要查询的天数") a=datetime.datetime.now() b=datetime.datetime(Year,Month,Day) print a-b localtime = time.asctime( time.localtime(time.time()) ) print u"现在时间为"+localtime if(choice==4): print u"感谢使用!" break
阅读全文
0 0
- Python实现日历查询
- python实现输出日历
- Java GrerorianCalendar 实现日历查询
- java 实现简单的日历查询
- 日历查询
- python实现DNS查询
- python实现关键字查询
- python 实现mysql 查询
- python实现查询天气
- 日历实现
- 日历实现
- selenium+python关于操作日历控件实现向日历文本框传递值的方法
- oracle sql查询日历
- sqlserver 查询日历
- java 日历查询
- 使用python实现短语查询
- python实现省市区字典查询
- Python 实现火车票查询工具
- C++ 带空格的字符串输入
- 回调函数例题
- HDU-1524-A Chess Game && POJ-2425 【sg】
- 剑指Offer—21—栈的压入、弹出序列
- HDU 1846 Brave Game 巴什博弈 SG打表
- Python实现日历查询
- Swagger简介
- Linux Android 相关书籍
- OAuth 2.0 构建微服务身份认证(一):授权模式选择
- Unity (二) Animator:Events
- HDU6144 Arithmetic of Bomb (2017百度之星程序设计大赛
- Bootstrap组件学习笔记(二)——按钮组和输入框组
- 教你怎么在新浪微博发布全景图,赚取微博全景第一波
- jQuery节点操作方法