2017年9月30日

摘要: datetime.now() # 获取当前datetimedatetime.utcnow() datetime(2017, 5, 23, 12, 20) # 用指定日期时间创建datetime 将以下字符串转换成datetime类型: '2017/9/30''2017年9月30日星期六''2017年 阅读全文
posted @ 2017-09-30 12:16 043李庆 阅读(128) 评论(0) 推荐(0) 编辑

2017年9月29日

摘要: 1.下载一中文长篇小说,并转换成UTF-8编码。 2.使用jieba库,进行中文词频统计,输出TOP20的词及出现次数。 3.排除一些无意义词、合并同一词。 4.对词频统计结果做简单的解读。 代码如下: 运行结果: 阅读全文
posted @ 2017-09-29 11:56 043李庆 阅读(135) 评论(0) 推荐(0) 编辑

2017年9月26日

摘要: ['after', 'the', 'winter', '-', 'lenka\n\nwhen', 'the', 'rain', 'is', "pourin'", 'down\n\n', 'and', 'there', 'are', 'snowflakes', 'on', 'your', 'cheek 阅读全文
posted @ 2017-09-26 21:36 043李庆 阅读(141) 评论(0) 推荐(0) 编辑

2017年9月22日

摘要: 字典实例:建立学生学号成绩字典,做增删改查遍历操作。 d={'01':'80','02':'70','03':'76','04':'86','05':'82'}print(d.keys())print(d.values())d['08']=98d['03']=99d.pop('02')print(d 阅读全文
posted @ 2017-09-22 14:53 043李庆 阅读(148) 评论(0) 推荐(0) 编辑

2017年9月20日

摘要: 1 a='''After the Winter - LenkaWhen the rain is pourin' downAnd there are snowflakes on your cheeksWhen your heart is frozen overAnd there is a sea lo 阅读全文
posted @ 2017-09-20 21:09 043李庆 阅读(109) 评论(0) 推荐(0) 编辑

2017年9月19日

摘要: 恺撒密码的编码 s=input('密文:')print('密文:',end='')for i in s:print(chr(ord(i)+3),end='') 国家名称 GDP总量(人民币亿元)中国 ¥765873.4375澳大利亚 ¥ 78312.4375(国家名称左对齐,数字右对齐,千分位,2位 阅读全文
posted @ 2017-09-19 10:50 043李庆 阅读(110) 评论(0) 推荐(0) 编辑

2017年9月15日

摘要: 已知‘星期一星期二星期三星期四星期五星期六星期日 ’,输入数字(1-7),输出相应的‘星期几’ s='星期一星期二星期三星期四星期五星期六星期天'for i in range(7): d=int(input('1-7:')) print(s[3*(d-1):3*d]) 输入学号,识别年级、专业、班级 阅读全文
posted @ 2017-09-15 12:05 043李庆 阅读(169) 评论(0) 推荐(0) 编辑

2017年9月12日

摘要: 画五角星 import turtleturtle.color('yellow')turtle.bgcolor('red')turtle.fillcolor('yellow') turtle.up()turtle.goto(-230,130)turtle.down() turtle.begin_fil 阅读全文
posted @ 2017-09-12 14:52 043李庆 阅读(148) 评论(0) 推荐(0) 编辑

2017年9月8日

摘要: 1、同切圆 Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)] on win32Type "copyright", "credits" or "license()" for more info 阅读全文
posted @ 2017-09-08 09:50 043李庆 阅读(140) 评论(0) 推荐(0) 编辑

2017年9月6日

摘要: 1、简单输入输出交互。 2、用户输入两个数字,计算并输出两个数字之和:(尝试只用一行代码实现这个功能) 3、输入半径,计算圆的面积 阅读全文
posted @ 2017-09-06 20:50 043李庆 阅读(120) 评论(0) 推荐(0) 编辑

导航