摘要: 实现线上汉诺塔移动问题1 n=eval(input()) 2 def hanoi(n,A,C,B): 3 if n==1: 4 print("{} --> {}".format(A,C)) 5 else: 6 hanoi (n-1,A,B,C) 7 print("{} --> {}".format( 阅读全文
posted @ 2020-04-14 21:03 litchi31 阅读(125) 评论(0) 推荐(0)
摘要: 1 import turtle 2 t = turtle.Turtle() 3 def curvemove(): 4 for i in range(200): 5 t.right(1) 6 t.forward(1) 7 t.pensize(15) 8 t.color('black', 'pink') 阅读全文
posted @ 2020-03-30 20:20 litchi31 阅读(226) 评论(0) 推荐(0)
摘要: 1 from tqdm import tqdm 2 import time 3 from random import random 4 from math import sqrt 5 DARTS=100000000 6 hits=0.0 7 time.clock() 8 for i in range 阅读全文
posted @ 2020-03-30 20:04 litchi31 阅读(137) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-03-11 20:42 litchi31 阅读(168) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-03-11 20:36 litchi31 阅读(127) 评论(0) 推荐(0)
摘要: #使用turtle库绘制一个红色五角星图形import turtle as t t.fillcolor("red") t.begin_fill() t.pensize(3) t.pu() t.fd(-150) t.pd() for i in range(5): t.fd(300) t.right(1 阅读全文
posted @ 2020-03-11 20:00 litchi31 阅读(139) 评论(0) 推荐(0)