[img]https://lh3.googleusercontent.com/OIQvytTgw4Swmo5f7Z4Xer1mB3_xTA3VPbdecugJOVrl8a47Pouyc2uZB3FRijGKYHOuh8KDYhGX-gf7rwtI9XbIkuRYsJ0x7dqbOJElnQya5T29ylq5c_HSGpEUDdqPF-MgvAM4XHQz3gtTRn5NVbI24cxt8GX-9LHqTXiCDyvZkLqboRU6U8-K1-0qLvNpILDL8xo=s320[/img]
[img]https://lh3.googleusercontent.com/OIQvytTgw4Swmo5f7Z4Xer1mB3_xTA3VPbdecugJOVrl8a47Pouyc2uZB3FRijGKYHOuh8KDYhGX-gf7rwtI9XbIkuRYsJ0x7dqbOJElnQya5T29ylq5c_HSGpEUDdqPF-MgvAM4XHQz3gtTRn5NVbI24cxt8GX-9LHqTXiCDyvZkLqboRU6U8-K1-0qLvNpILDL8xo=s320[/img]
Lemon4ik1703проверьте
Дано натуральное число n, действительное число x. Вычислить:
import math def f(n, x): return sum(((x + math.cos(i - x))/2**i for i in range(1, n+1)))