Programerat / programerat.github.io

MIT License
2 stars 0 forks source link

Gjej shumën e matricës - Programerat #24

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

Gjej shumën e matricës - Programerat

https://programerat.github.io/detyrat/problemi-gjeje-nese-shumen-e-matrices

fatonakiki commented 1 year ago
def zgjidhja(matrica):
    a = []
    sum = 0
    for i in range(len(matrica)):
        for j in range(len(matrica[i])):
            if j not in a:
                if matrica[i][j] == 0:
                    a.append(j)
                else:
                    sum += matrica[i][j]
    return sum
didslm commented 1 year ago

Sakte @fatonakiki, shum bukur ne zgjidhje e matrices.