摘要: 1、字典实例:建立学生学号成绩字典,做增删改查遍历操作。 建立: d={'0001':'99','0003':'89','0004':'98','0005':'100','0006':'78'} 增:d['0002']='79' 删:d.pop('0001') 改:d['0004']=100 查:p 阅读全文
posted @ 2017-09-22 20:55 018林彬 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 1、实例: 下载一首英文的歌词或文章,将所有,.?!等替换为空格,将所有大写转换为小写,统计某几个单词出现的次数,分隔出一个一个的单词。 >>> bin='''Put your make up on Get your nails done Curl your hair Run the extra m 阅读全文
posted @ 2017-09-20 21:32 018林彬 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 1、恺撒密码的编码 code=input('明文:')print('密文:',end='')for i in code: print(chr(ord(i)+3),end='') 2、国家名称 GDP总量(人民币亿元)中国 ¥765873.4375澳大利亚 ¥ 78312.4375(国家名称左对齐,数 阅读全文
posted @ 2017-09-19 14:36 018林彬 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 1、已知‘星期一星期二星期三星期四星期五星期六星期日 ’,输入数字(1-7),输出相应的‘星期几’。 s="星期一星期二星期三星期四星期五星期六星期日"d=int(input("输入1-7:"))print('今天是',s[3*(d-1):3*d]) 2、输入学号,识别年级、专业、班级、序号 s=i 阅读全文
posted @ 2017-09-15 17:48 018林彬 阅读(151) 评论(0) 推荐(0) 编辑
摘要: a、画五角星 import turtleturtle.color('yellow')turtle.fillcolor('yellow')turtle.begin_fill()for i in range(5): turtle.forward(200) turtle.right(144) turtle 阅读全文
posted @ 2017-09-12 21:11 018林彬 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 1、画一组同切圆 >>> import turtle >>> turtle.circle(50) >>> turtle.circle(80)>>> turtle.circle(100)>>> turtle.circle(60)>>> turtle.circle(70)>>> turtle.circl 阅读全文
posted @ 2017-09-08 19:03 018林彬 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 1、简单输入输出交互。 输出:print(‘Hollo world!') Hollo world 输入:input('please input your name:') please input your name:bin 'bin' name=input(':') :bin print(name) 阅读全文
posted @ 2017-09-06 21:40 018林彬 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 1.信息与数据的区别是什么? 数据仅仅是一些简单的记录,而信息是数据经过加工处理后形成的一种能对我们产生影响的数据解释。 2.信息与知识的区别是什么? 信息是对数据的一种解释,但知识是对意识的反映,是对经过实践证明的客体在社会的人的意识中相对正确的反映。 3.举一个同一主题不同级别的数据、信息、知识 阅读全文
posted @ 2017-09-05 15:50 018林彬 阅读(159) 评论(0) 推荐(0) 编辑