Advertisement
Uno2K

Aula5 - calcula_serie

Sep 16th, 2021
808
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. def calcula_serie(a, b, n):
  2.     list = []
  3.     for c in range(n):
  4.         fração = (1 / a**(c*b))
  5.         list.append(fração)
  6.     print(list)
  7.     return sum(list)
  8. print(calcula_serie(2, 2, 11))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement