a = int(input("a= "))
q = int(input("q= "))
n = int(input("n= "))
list1 = []
for x in range(0,n):
if len(list1) == 0:
list1.append(a)
else:
list1.append(list1[-1]*q)
print(str(list1))
Объяснение:
a = int(input("a= "))
q = int(input("q= "))
n = int(input("n= "))
list1 = []
for x in range(0,n):
if len(list1) == 0:
list1.append(a)
else:
list1.append(list1[-1]*q)
print(str(list1))
Объяснение: