会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
ghhzaq
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
2020年3月29日
汉诺塔
摘要: 1 count = 0 2 def hanoi(n, src, dst, mid): 3 global count 4 if n == 1: 5 print("{}:{}->{}".format(1,src,dst)) 6 count += 1 7 else : 8 hanoi(n-1, src,
阅读全文
posted @ 2020-03-29 19:15 ghhzaq
阅读(94)
评论(0)
推荐(0)
2020年3月22日
有进度条的圆周率计算
摘要: 1 import time 2 from random import random 3 DARTS = 1000*1000 4 hits = 0.0 5 for i in range(1, DARTS+1): 6 x, y = random(), random() 7 dist = pow(x **
阅读全文
posted @ 2020-03-22 15:04 ghhzaq
阅读(114)
评论(0)
推荐(0)
2020年3月11日
turtle 笔记
摘要:
阅读全文
posted @ 2020-03-11 20:02 ghhzaq
阅读(93)
评论(0)
推荐(0)
python 五角星 六角星 叠加等边三角形
摘要: 五角星 1 #wujioxin.py 2 import turtle 3 turtle.fillcolor("red") 4 turtle.begin_fill() 5 while True: 6 turtle.forward(220) 7 turtle.right(144) 8 if abs(tu
阅读全文
posted @ 2020-03-11 18:55 ghhzaq
阅读(1181)
评论(0)
推荐(0)
上一页
1
2
公告