资源简介
Python基础教程-第3版(文字版)电子书+源码
代码片段和文件信息
# Print out a date given year month and day as numbers
months = [
‘January‘
‘February‘
‘March‘
‘April‘
‘May‘
‘June‘
‘July‘
‘August‘
‘September‘
‘October‘
‘November‘
‘December‘
]
# A list with one ending for each number from 1 to 31
endings = [‘st‘ ‘nd‘ ‘rd‘] + 17 * [‘th‘] \
+ [‘st‘ ‘nd‘ ‘rd‘] + 7 * [‘th‘] \
+ [‘st‘]
year = input(‘Year: ‘)
month = input(‘Month (1-12): ‘)
day = input(‘Day (1-31): ‘)
month_number = int(month)
day_number = int(day)
# Remember to subtract 1 from month and day to get a correct index
month_name = months[month_number-1]
ordinal = day + endings[day_number-1]
print(month_name + ‘ ‘ + ordinal + ‘ ‘ + year)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 25963 2017-03-09 22:57 Beginning Python_version3_SourceCode\beginning-python-3ed-master\9781484200292.jpg
----------- --------- ---------- ----- ----
25963 1
相关资源
- python pyqt5 计时器源代码
- 基于物品的协同过滤算法itemCF原理及
- python cookbook 3th 英文版
- problem-solving-with-algorithms-and-data-struc
- PythonCard
- 《Python爬虫-开发与项目实战》源码
- bayes分类python
- python满分大作业 打地鼠
- Python物理建模初学者指南
- pyltp wheel python3.5 3.6
- Python自然语言处理(PDF高清书籍分享
- 基于Python自相关法时间序列的时间延
- 利用 Python 进行数据分析 中文第二版
- Problem Solving with Algorithms and DataStruct
- python计算机二级教程1-11章
- python自然语言处理中文版.pdf223593
- python的pywt库
- PTVS 2.2 VS 2013 补充工具 自动提示功能
- data-science-using-python-r
- Python for VS2012官方版
- A Byte of Python(简明Python教程)(第
- wxPython 2.8 Application Development Cookbook
- 终极自动化测试环境搭建:Selenium+E
- 基于django搭建的博客
- SHA-3 哈希摘要算法 python 源代码及官方
- sha3 python 史上最全最详细的正确实现
- Hands On Machine Learning with Python: Concept
- Python for everybody (EDX)
- Python数据分析与机器学习-贝叶斯实现
-
PyGob
ject(pygtk3)全解——超多代码
评论
共有 条评论