摘要: 中文分词 解读: 讲的是三藏与大圣美猴王的故事 阅读全文
posted @ 2017-09-29 21:48 013洪辉 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 1.读入待分析的字符串 2.分解提取单词 3.计数字典 4.排除语法型词汇 5.排序 6.输出TOP(20) 阅读全文
posted @ 2017-09-26 19:23 013洪辉 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 1,字典实例:建立学生学号成绩字典,做增删改查遍历操作。 dict={"1":"60","2":"56","3":"82","4":"74","5":"59"} print("查询2号的成绩")print(dict.get('2'))print("删除3号的记录")dict.pop('3')prin 阅读全文
posted @ 2017-09-22 17:29 013洪辉 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 1、实例: 下载一首英文的歌词或文章,将所有,.?!等替换为空格,将所有大写转换为小写,统计某几个单词出现的次数,分隔出一个一个的单词。 a='''Twinkle, twinkle, little star, How I wonder what you are! Up above the world 阅读全文
posted @ 2017-09-20 20:28 013洪辉 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 1,恺撒密码的编码 s=input('明文:')print('密文:',end='')for i in s: print(chr(ord(i)+3),end='') 2,国家名称 GDP总量(人民币亿元) 中国 ¥765873.4375澳大利亚 ¥ 78312.4375(国家名称左对齐,数字右对齐, 阅读全文
posted @ 2017-09-19 11:28 013洪辉 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 1,已知‘星期一星期二星期三星期四星期五星期六星期日 ’,输入数字(1-7),输出相应的‘星期几’ s='星期一星期二星期三星期四星期五星期六星期日'd=int(input('1-7:'))print(s[3*(d-1):3*d]) 2,输入学号,识别年级、专业、班级、序号 s=input('请输入 阅读全文
posted @ 2017-09-15 12:31 013洪辉 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 1,画五角星 import turtleturtle.bgcolor('red')turtle.fillcolor('yellow')turtle.begin_fill()for i in range(5): turtle.forward(100) turtle.left(144) turtle.e 阅读全文
posted @ 2017-09-12 13:22 013洪辉 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 1画一组同切圆 import turtle turtle.circle(10) turtle.circle(20) turtle.circle(30) 2画一组同心圆 import turtleturtle.circle(20)turtle.up()turtle.goto(0,-20)turtle. 阅读全文
posted @ 2017-09-08 09:47 013洪辉 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 1,简单输入输出交互。 input('please input your name;') please input your name:hh 'hh' name=input('what your name:') what your name:hh print('你好,%s'%name) 你好,hh 阅读全文
posted @ 2017-09-06 20:41 013洪辉 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 1. 信息和数据的区别? 信息具有关联性和目的性的结构化、组织化的数据 数据是反映客观事物属性的记录,是信息的具体表现形式 2.信息与知识的区别是什么? 信息具有关联性和目的性的结构化、组织化的数据 知识是对信息的进一步加工和应用,是对事物内在规律和原理的认识 3.举一个同一主题不同级别的数据、信息 阅读全文
posted @ 2017-09-05 09:44 013洪辉 阅读(197) 评论(0) 推荐(0) 编辑