Guest User

Untitled

a guest
May 16th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. def soma_progressao_aritmetica(n, a1, q):
  2. return a1 * (q**n - 1) / (q - 1)
  3.  
  4. print(soma_progressao_aritmetica(n=7, a1=1, q=3)) # 1093.0
Add Comment
Please, Sign In to add comment