Код + скриншот с кодом и выводом компилятора:
n = int(input("Enter: n = "))
result = 0
addition = 0
second_brackets = 0
for i in range(1,n+1):
second_brackets += i
addition = ((-1)**(i+1))*(second_brackets)/(i**5)
result += addition
print("Result = ",'{:.2f}'.format(result))
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Код + скриншот с кодом и выводом компилятора:
n = int(input("Enter: n = "))
result = 0
addition = 0
second_brackets = 0
for i in range(1,n+1):
second_brackets += i
addition = ((-1)**(i+1))*(second_brackets)/(i**5)
result += addition
print("Result = ",'{:.2f}'.format(result))