会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
三米巨人
博客园
首页
新随笔
联系
订阅
管理
随笔 - 11
文章 - 0
评论 - 0
阅读 -
1422
2018年6月20日
期末综合大作业:词频统计
摘要: #1 small = open('Just A Girl.txt',mode='r',encoding='utf-8') smallText = small.read() small.close() print(smallText) #2 replaceList =['?','!',',','.',
阅读全文
posted @ 2018-06-20 21:46 三米巨人
阅读(120)
评论(0)
推荐(0)
2018年6月13日
递归,汉诺塔游戏
摘要: def hanoi(n,a,b,c): if n==1: print(n,a+'->'+c) else: hanoi(n-1,a,c,b) print(n,a+'->'+c) hanoi(n-1,b,a,c) hanoi(6,'A','B','C')
阅读全文
posted @ 2018-06-13 21:01 三米巨人
阅读(111)
评论(0)
推荐(0)
2018年5月30日
文件操作,列表实例NiceHexSpiral
摘要: fr = open ('red.txt',mode='r',encoding='utf-8') red = fr.read() print('明文:'+ red) print('密文:',end='') fr.close() fw = open('blue.txt',mode ='a',encoding='utf-8') for c in red: print(chr(ord(c)+3...
阅读全文
posted @ 2018-05-30 21:38 三米巨人
阅读(127)
评论(0)
推荐(0)
2018年5月23日
字符串操作
摘要: stuNum = '201709090060' print('年级是:'+stuNum[0:4]) print('专业编号是:'+stuNum[4:9]) print('序号是:'+stuNum[-3:]) IDNo= '440509199906180026' print('省市是:'+IDNo[0:2]) print('生日是:'+IDNo[-8:-4]) print('性别是:'+IDNo...
阅读全文
posted @ 2018-05-23 21:15 三米巨人
阅读(131)
评论(0)
推荐(0)
函数定义与使用,字符串类型
摘要: stuNum = '201709090060' print('年级是:'+stuNum[0:4]) print('专业编号是:'+stuNum[4:9]) print('序号是:'+stuNum[-3:]) IDNo= '440509199906180026' print('省市是:'+IDNo[0
阅读全文
posted @ 2018-05-23 19:44 三米巨人
阅读(107)
评论(0)
推荐(0)
2018年5月16日
函数定义与使用
摘要: import turtle turtle.setup(600,400,0,0) turtle.bgcolor('red') turtle.color('yellow') turtle.fillcolor('yellow') def mygoto(x,y): turtle.penup() turtle
阅读全文
posted @ 2018-05-16 20:23 三米巨人
阅读(113)
评论(0)
推荐(0)
2018年5月9日
for循环:用turtle画一颗五角
摘要: import turtle turtle.pencolor('blue') turtle.fillcolor('red') turtle.begin_fill() while True: turtle.forward(100) turtle.right(50) if abs(turtle.position())<1: break turtle.end...
阅读全文
posted @ 2018-05-09 21:17 三米巨人
阅读(253)
评论(0)
推荐(0)
2018年5月2日
程序执行流程/布尔类型与布尔:运算猜数字游戏;库的使用:turtle
摘要: import turtle turtle.fillcolor('pink') turtle.begin_fill() turtle.circle(40) turtle.end_fill() turtle.up() turtle.goto(0,-40) turtle.down() turtle.fillcolor('yellow') turtle.begin_fill() turtle.cir...
阅读全文
posted @ 2018-05-02 21:18 三米巨人
阅读(130)
评论(0)
推荐(0)
2018年4月25日
条件语句,while循环语句:完整的温度转换程序
摘要: a=int(input ('摄氏度转换为华氏度请按 1\n华氏度转换为摄氏度请按 2\n')) if a==1: c = float(input('请输入摄氏温度:')) f = c*9/5+32 print('{:.2f}°C转换成华氏温度为{:.2f}°F'.format(c,f)) else:
阅读全文
posted @ 2018-04-25 21:47 三米巨人
阅读(123)
评论(0)
推荐(0)
2018年4月18日
理解数据类型与数学运算:求和、温度转换
摘要: >>> a = input('请输入第一个数: ') 请输入第一个数: 7 >>> print(a) 7 >>> type(7) >>> int(a)+7 14 a = input('输入摄氏度') sum2 = int(a) * 9/5+32 print('华氏温度 :{}'.format(sum2)) a = input('输入华氏温度') sum2 = 5*( int(a) -32...
阅读全文
posted @ 2018-04-18 21:41 三米巨人
阅读(70)
评论(0)
推荐(0)
下一页
公告
昵称:
三米巨人
园龄:
7年2个月
粉丝:
0
关注:
0
<
2025年7月
>
日
一
二
三
四
五
六
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
搜索
常用链接
我的随笔
我的评论
我的参与
最新评论
我的标签
随笔档案
2018年6月(2)
2018年5月(6)
2018年4月(3)
阅读排行榜
1. for循环:用turtle画一颗五角(253)
2. 输入、输出与Mad Libs 游戏(137)
3. 字符串操作(131)
4. 程序执行流程/布尔类型与布尔:运算猜数字游戏;库的使用:turtle(130)
5. 文件操作,列表实例NiceHexSpiral(127)
点击右上角即可分享