摘要: pi = 0 N = 100 for k in range(N): pi += 1/pow(16, k) * (4 / (8 * k + 1) - 2 /(8 * k + 4) - 1/(8 * k + 5) - 1 /(8 * k + 6)) print("圆周率值是:{}".format(pi) 阅读全文
posted @ 2020-10-11 02:39 英魂 阅读(111) 评论(0) 推荐(0)
摘要: import turtle as t t.pensize(2) t.penup() t.goto(0,-200) t.pendown() #初始化海龟位置 coordA=(0,0) #小圆起点坐标的x值 coordB=(120,-80) #小圆起点坐标的y值 color=("black","whit 阅读全文
posted @ 2020-09-24 23:03 英魂 阅读(2308) 评论(0) 推荐(0)
摘要: import turtle as t t.pensize(5) coordA=(-110,0,110,-55,55) #五个图起点坐标的x值 coordB=(-25,-25,-25,-75,-75) #五个圆起点坐标的y值 color=("red","blue","green","yellow"," 阅读全文
posted @ 2020-09-24 23:00 英魂 阅读(401) 评论(0) 推荐(0)
摘要: import turtle as t n = eval(input()) t.penup() t.goto(-350,0) t.pendown() t.pensize(2) t.color("blue","yellow") t.begin_fill() for i in range(3,n): t. 阅读全文
posted @ 2020-09-24 22:57 英魂 阅读(2134) 评论(0) 推荐(0)
摘要: import turtle as a m = eval(input())#圆的半径 n = eval(input())#圆的个数 c = input()#画笔的颜色 a.pencolor("{}".format(c)) for i in range(n): a.penup() a.goto(0, - 阅读全文
posted @ 2020-09-24 22:53 英魂 阅读(1989) 评论(0) 推荐(0)
摘要: import turtle turtle.pensize(5 ) turtle.pencolor("yellow") turtle.fillcolor("red") turtle.begin_fill() for i in range(5): turtle.forward(200) turtle.r 阅读全文
posted @ 2020-09-24 22:45 英魂 阅读(109) 评论(0) 推荐(0)
摘要: import turtle as a for i in range(4):#画大三角形 a.left(120) a.fd(400) a.bk(200) a.left(60)#画小三角形 for i in range(3): a.fd(200) a.left(120) a.done() 阅读全文
posted @ 2020-09-15 14:26 英魂 阅读(2224) 评论(0) 推荐(0)
摘要: import turtle as a a.left(30)#画第一个三角形 a.fd(200) for i in range(2): a.right(120) a.fd(300) a.right(120) a.fd(100) a.right(120)#画第二个三角形 a.fd(200) for i 阅读全文
posted @ 2020-09-15 14:24 英魂 阅读(595) 评论(0) 推荐(0)
摘要: import turtle as a a.begin_fill() for i in range(5): a.fd(200) a.right(144) a.fillcolor("red") a.end_fill() a.done() 阅读全文
posted @ 2020-09-15 14:05 英魂 阅读(109) 评论(0) 推荐(0)