human
Program to print GP ( Geometric Progression ) | function to print GP.
starting number.
Common ratio.
N th term to be find"
How can the above be solved in Python?
assistant
#Here is code to program to print GP ( Geometric Progression ) and the other steps required.
 def printGP ( a , r , n ) :
	for i in range ( 0 , n ) :
		curr_term = a * pow ( r , i )
		print ( curr_term , end = " ▁ " )
a = 2
r = 3
n = 5
printGP ( a , r , n )