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日
摘要: 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) 编辑
摘要: 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日
摘要: name1 = input('请输入一个名字:') name2 = input('在输入一个名字:') car = input('请输入一种车子') print('练完铁头功的{}刚下山,就被{}开着{}撞飞了'.format(name1,name2,car)) 阅读全文
posted @ 2018-04-18 21:14 苏俊康 阅读(82) 评论(0) 推荐(0) 编辑