It's not about this topic


#1
rg = input("Input the length of your progression")

ini = input("The first number in progression:")

mg = input("Input the value:")#this value will be used in progression

mod = raw_input("Modo arit ou geo:")#arit= aitmetica geome = geometrica


def prog(ran, init, wow, mode):
    lst = [] 
    if "mode" == "geo" and type(init) == int and type(wow) == int and type(ran) == int:
        for a in range(ran):
            w = init ** wow
            print w
            lst.append(w)
    elif "mode" == "arit" and type(init) == int and type(wow) == int and type(ran) == int:
        for a in range(ran):
            w = init + wow
            lst.append(w)
    return lst
#rg = ran // init = inicio // wow = mg // mode = modo
print prog(rg, ini, mg, mod)


Hello, i need some help, with this code, i don't know why it's not appending.

#2

@corerockstar72116

Take a gander at that.