Uno2K

Aula5 - calcula_serie

Sep 16th, 2021
612
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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))
RAW Paste Data