代码改变世界

第九次作业

2017-09-29 09:49 by 019王泽, 166 阅读, 0 推荐, 收藏,
摘要:1.下载一中文长篇小说,并转换成UTF-8编码。 2.使用jieba库,进行中文词频统计,输出TOP20的词及出现次数。 3.排除一些无意义词、合并同一词。 4.对词频统计 结果做简单的解读 阅读全文

第八次作业

2017-09-26 21:35 by 019王泽, 168 阅读, 0 推荐, 收藏,
摘要:1.读入待分析的字符串 2.分解提取单词 3.计数字典 4.排除语法型词汇 5.排序 6.输出TOP(20) 阅读全文

阿飞dadasd

2017-09-26 09:51 by 019王泽, 266 阅读, 0 推荐, 收藏,
摘要:n='''The driver, being a sensitive man as well as an animal lover, pulled over to the side of the road, and got out to see what had become of the Bunn 阅读全文

第八次作业

2017-09-22 14:17 by 019王泽, 166 阅读, 0 推荐, 收藏,
摘要:1.字典实例:建立学生学号成绩字典,做增删改查遍历操作 name=['001','002','003','004']scores=[7,6,6,5]d={'001':7,'002':6,'003':6,'004':5}print(d)d['005']=5print(d)d.pop('003')pri 阅读全文

作业

2017-09-20 20:57 by 019王泽, 169 阅读, 0 推荐, 收藏,
摘要:1.实例: 下载一首英文的歌词或文章,将所有,.?!等替换为空格,将所有大写转换为小写,统计某几个单词出现的次数,分隔出一个一个的单词。 wei='''As a parent, you always think your child is the best ever -- that's just w 阅读全文

字符串

2017-09-19 09:53 by 019王泽, 166 阅读, 0 推荐, 收藏,
摘要:1.恺撒密码的编码 d=input('明文:')print('密文:',end='')for i in d: print(chr(ord(i)+3),end='') 2.国家名称 GDP总量(人民币亿元)中国 ¥765873.4375澳大利亚 ¥ 78312.4375(国家名称左对齐,数字右对齐,千 阅读全文

字符串基本操作

2017-09-15 16:15 by 019王泽, 128 阅读, 0 推荐, 收藏,
摘要:1.已知‘星期一星期二星期三星期四星期五星期六星期日 ’,输入数字(1-7),输出相应的‘星期几’ s='星期一星期二星期三星期四星期五星期六星期日'i=int(input('1-7:'))print(s[3*(i-1):3*i]) 2.输入学号,识别年级、专业、班级、序号 s=input('请输入 阅读全文

条件、循环、函数定义 练习

2017-09-12 13:35 by 019王泽, 132 阅读, 0 推荐, 收藏,
摘要:画五角星 import turtlefor i in range(5): turtle.forward(150) turtle.left(144) 画同心圆 import turtlefor i in range(5): turtle.up() turtle.goto(0,-20*(i+1)) tu 阅读全文

作业

2017-09-08 10:13 by 019王泽, 148 阅读, 0 推荐, 收藏,
摘要:1. 画一组同切圆 import turtle turtle.circle(30) turtle.circle(50) turtle.circle(70) turtle.circle(90) 2. 画一组同心圆 import turtleturtle.shape('turtle')turtle.ci 阅读全文

作业

2017-09-06 19:10 by 019王泽, 172 阅读, 0 推荐, 收藏,
摘要:>>> input('请输入你的名字:')请输入你的名字:彬'彬'>>> name=input(':'):彬>>> print(name)彬>>> input('请输入你的名字:')请输入你的名字:彬'彬'>>> name=input(:)SyntaxError: invalid syntax>>> 阅读全文