摘要:
科赫曲线绘制源代码 #KochDrawV1.py import turtle def koch(size, n): if n == 0: turtle.fd(size) else: for angle in [0, 60, -120, 60]: turtle.left(angle) koch(siz 阅读全文
posted @ 2019-07-25 22:52
板岩
阅读(1287)
评论(0)
推荐(0)
摘要:
#A:起始,B:中间,C:最后count=0def hanoi(n,A,B,C): global count if n==1: print("{}:{}->{}".format(1,A,C)) count+=1 else: hanoi(n-1,A,C,B) #将前n-1个盘子从A移动到B上 prin 阅读全文
posted @ 2019-07-25 08:02
板岩
阅读(142)
评论(0)
推荐(0)

浙公网安备 33010602011771号