You are on page 1of 1

LDN = [100, 50, 20, 10, 5,2,1]

VAP = int(input("coloque o valor:"))


N = 0
NU = []
q100 = 0
q50 = 0
q20 = 0
q10 = 0
q5 = 0
q2 = 0
q1 = 0
ql = [q100,q50,q20,q10,q5,q2,q1]
i = 0
while VAP != 0:
index = 0
for x in LDN:
if LDN[index] <= VAP:
NU.append(LDN[index])
VAP -= LDN[index]
else:
index += 1
for x in NU:
if NU[i] == 100:
ql[0] +=1
elif NU[i] == 50:
ql[1] +=1
elif NU[i] == 20:
ql[2] +=1
elif NU[i] == 10:
ql[3] +=1
elif NU[i] == 5:
ql[4] +=1
elif NU[i] == 2:
ql[5] +=1
elif NU[i] == 1:
ql[6] += 1
i += 1
print(F" notas de 100 -- {ql[0]}\n notas de 50 -- {ql[1]}\n notas de 20 -- {ql[2]}\
n"
F" notas de 10 -- {ql[3]}\n notas de 5 -- {ql[4]}\n notas de 2 -- {ql[5]}\n
moedas de 1 -- {ql[6]}")

You might also like