yshda

导航

 

2020年3月29日

摘要: count=0 def han(n,src,dst,mid): global count if n==1: print("{}:{}->{}".format(1,src,dst)) count+=1 else: han(n-1,src,mid,dst) print("{}:{}->{}".forma 阅读全文
posted @ 2020-03-29 15:01 yshda 阅读(124) 评论(0) 推荐(0)
 

2020年3月25日

摘要: import time from random import random scale = 10 print("执行开始".center(scale//2, "-")) start=time.perf_counter() DARTS=1000*1000 hits=0.0 for i in range 阅读全文
posted @ 2020-03-25 15:25 yshda 阅读(141) 评论(0) 推荐(0)
 

2020年3月15日

摘要: 1.turtle库是Python语言中一个很流行的绘制图像的函数库,想象一个小乌龟,在一个横轴为x、纵轴为y的坐标系原点,(0,0)位置开始,它根据一组函数指令的控制,在这个平面坐标系中移动,从而在它爬行的路径上绘制了图形。 2.在使用turtle库前需要安装turtle库,在写代码前需先引入tur 阅读全文
posted @ 2020-03-15 12:22 yshda 阅读(471) 评论(0) 推荐(0)
 

2020年3月11日

摘要: 六角形的绘制 import turtleturtle.color('red','yellow')turtle.pensize(6)turtle.begin_fill() turtle.left(30) turtle.forward(100) turtle.right(60) turtle.forwa 阅读全文
posted @ 2020-03-11 16:49 yshda 阅读(136) 评论(0) 推荐(0)