会员
周边
新闻
博问
AI培训
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
苏俊康
博客园
首页
新随笔
联系
订阅
管理
2018年6月20日
期末综合大作业:词频统计
摘要: #1, riverFile = open('river.txt','r') riverTest = riverFile.read() riverFile.close() print(riverTest) #2, print(riverTest.replace(',',' ')) print( riverTest.replace("'",' ')) print(riverTest) #3, ...
阅读全文
posted @ 2018-06-20 19:35 苏俊康
阅读(135)
评论(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)
阅读全文
posted @ 2018-06-13 21:14 苏俊康
阅读(147)
评论(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:17 苏俊康
阅读(169)
评论(0)
推荐(0)
编辑
2018年5月9日
for循环:用turtle画一颗五角星
摘要: import turtle turtle.setup(800,400,0,0) turtle.bgcolor('purple') turtle.color("blue") turtle.fillcolor("red") turtle.begin_fill() for i in range(5): t
阅读全文
posted @ 2018-05-09 20:17 苏俊康
阅读(117)
评论(0)
推荐(0)
编辑
程序执行流程/布尔类型与布尔:运算猜数字游戏;库的使用:turtle
摘要: number = 23 while True: guess = int(input('请输入一个数字:')) if guess > number: print('>') elif guess < number: print('<') else: print('=') break import...
阅读全文
posted @ 2018-05-09 20:13 苏俊康
阅读(68)
评论(0)
推荐(0)
编辑
2018年4月25日
理解数据类型与数学运算:求和、温度转换
摘要: a=input('请输入华氏温度') sum2=int(a)*5/9-32 print('转换的摄氏温度是;{}'.format(sum2)) a=input('请输入摄氏温度') sum2=int(a)*5/9+32 print('转换的华氏温度是;{}'.format(sum2))
阅读全文
posted @ 2018-04-25 20:21 苏俊康
阅读(107)
评论(0)
推荐(0)
编辑
2018年4月18日
输入、输出与Mad Libs 游戏
摘要: name1 = input('请输入一个名字:') name2 = input('在输入一个名字:') car = input('请输入一种车子') print('练完铁头功的{}刚下山,就被{}开着{}撞飞了'.format(name1,name2,car))
阅读全文
posted @ 2018-04-18 21:14 苏俊康
阅读(82)
评论(0)
推荐(0)
编辑