import math
d = 0.01
r = (d**-1)
r1 = (d**-1)/2
x = 0
cres = 0
for i in range(r):
x1 = x + d
x2 = x1 + d
for j in range(r):
y1 = math.sqrt(abs(1 - x1))
y2 = math.sqrt(abs(1 - x2))
for b in range(50):
dy = abs(y2 - y1)
if y2 < 1 and y1 < 1:
dx = d
c = math.sqrt((dy**2) + (dx**2))
cres = cres + c
print(cres * 4)
Это программа для подсчета длинны окружности
d = 0.01
r = (d**-1)
r1 = (d**-1)/2
x = 0
cres = 0
for i in range(r):
x1 = x + d
x2 = x1 + d
for j in range(r):
y1 = math.sqrt(abs(1 - x1))
y2 = math.sqrt(abs(1 - x2))
for b in range(50):
dy = abs(y2 - y1)
if y2 < 1 and y1 < 1:
dx = d
c = math.sqrt((dy**2) + (dx**2))
cres = cres + c
print(cres * 4)
Это программа для подсчета длинны окружности