Skip to content

Instantly share code, notes, and snippets.

@Mdslino
Created January 16, 2018 23:34
Show Gist options
  • Save Mdslino/30b3507d4216ff3378c081e49af9e680 to your computer and use it in GitHub Desktop.
Save Mdslino/30b3507d4216ff3378c081e49af9e680 to your computer and use it in GitHub Desktop.
valor = int(input("Digite o valor: "))
cedulas = [100, 50, 20, 10, 5, 2, 1]
notas = {}
for cedula in cedulas:
if valor >= cedula and valor > 0:
notas[cedula] = valor // cedula
valor -= notas[cedula] * cedula
else:
break
for key, value in notas.items():
print(f'Notas de {key} = {value}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment