Рекурсия:
from math import cos, radians
def znamenatel(n):
if n == 0: return 0
else: return n**2 + znamenatel(n-1)
def f(n):
if n == 0: return 1
else: return (1+cos(radians(n))/znamenatel(n)) * f(n-1)
print(f(180))
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Рекурсия:
from math import cos, radians
def znamenatel(n):
if n == 0: return 0
else: return n**2 + znamenatel(n-1)
def f(n):
if n == 0: return 1
else: return (1+cos(radians(n))/znamenatel(n)) * f(n-1)
print(f(180))