Professional Documents
Culture Documents
GP Maker
GP Maker
GP Maker
#where a is the first term, r is the common ratio and n is the number of terms.
#Input values from user
a=int(input("Enter first value of your progression:\n"))
r=int(input("Enter thee commonn ratio of your progression:\n"))
n=int(input("Enter number values in of your progression:\n"))
#Calculating GP
print("The sequence is:")
for i in range(0,n):
k=r**i
gp=a*k
print(gp)