DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
nth term of gp in python when 2,3 terms given
n1=int(input()) n2=int(input()) n=int(input()) r=n2/n1 a=n1/r print(a*r**(n-1))
PREVIOUS
NEXT
Tagged:
#nth
#term
#gp
#python
#terms
ADD COMMENT
Topic
COMMENT
Name
8+4 =
Submit