码迷,mamicode.com
首页 > 其他好文 > 详细

组合数据类型练习,英文词频统计实例

时间:2017-09-20 19:35:16      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:tle   img   odi   学生   遍历   代码   增删改查   查询   long   

1、由字符串创建一个作业评分表,做增删改查询统计遍历操作,例如查询第一个3分的下标,统计1分的同学有几个,3分的同学有几个,增删改查等等。

技术分享

2、字典实例:建立学生学号成绩字典,做增删改查遍历操作。

技术分享

3.列表,元组,字典,集合的遍历。

技术分享

 

4.英文词频统计实例

news = ‘‘‘When I was young I‘d listen to the radio
 Waiting for my favorite songs
 When they played I‘d sing along,
 It make me smile.
  
Those were such happy times and not so long ago
 How I wondered where they‘d gone.
 But they‘re back again just like a long lost friend
 All the songs I love so well.
 Every shalala every wo‘wo
 still shines.
  
Every shing-a-ling-a-ling that they‘re starting to sing
 so fine
  
When they get to the part
 where he‘s breaking her heart
 It can really make me cry
 just like before.
 It‘s yesterday once more.
 (Shoobie do lang lang)
 (Shoobie do lang lang)
 Looking bak on how it was in years gone by
 And the good times that had
 makes today seem rather sad,
 So much has changed.
  
It was songs of love that I would sing to them
 And I‘d memorise each word.
 Those old melodies still sound so good to me
 As they melt the years away
 Every shalala every wo‘wo still shines
  
Every shing-a-ling-a-ling that they‘re startingTo sing
 so fine
 All my best memorise come back clearly to me
 Some can even make me cry
 just like before.
 It‘s yesterday once more.
 (Shoobie do lang lang)
 Every shalala every wo‘wo still shines.
 Every shing-a-ling-a-ling that they‘re starting to sing
 so fine
 Every shalala every wo‘wo still shines.
 Every shing-a-ling-a-ling that they‘re starting to sing‘‘‘
技术分享

 

组合数据类型练习,英文词频统计实例

标签:tle   img   odi   学生   遍历   代码   增删改查   查询   long   

原文地址:http://www.cnblogs.com/zhibao/p/7562837.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!