📜  python代码示例中的几何级数

📅  最后修改于: 2022-03-11 14:45:41.324000             🧑  作者: Mango

代码示例1
def geometric_progression(a1, n, q):
    print(a1)
    for i in range(1, n + 1):
        power = i - 1
        t = a1 * q ** power
        print(t)