last lab
This commit is contained in:
16
labPython/lab2/task6.py
Executable file
16
labPython/lab2/task6.py
Executable file
@@ -0,0 +1,16 @@
|
||||
print("введите точность и коэффициент")
|
||||
from math import atan
|
||||
T = int(input())
|
||||
x = float(input())
|
||||
count = 0
|
||||
num = 0
|
||||
for i in range(1, T, 2):
|
||||
count += 1
|
||||
if count%2 == 1:
|
||||
num += (x**i)/i
|
||||
else:
|
||||
num -= (x**i)/i
|
||||
|
||||
print(atan(x))
|
||||
print(f"Число arctng(x) с точностью {T}: {num}")
|
||||
|
||||
Reference in New Issue
Block a user