Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- li = [100.0, 50.0, 20.0, 10.0, 5.0, 2.0, 1.0, 0.5, 0.25, 0.10, 0.05, 0.01]
- n = float(input())
- n += 0.001
- print "NOTAS:"
- for item in li:
- c = 0
- while n >= item:
- n -= item
- c += 1
- if item == 1.0:
- print "MOEDAS:"
- if item >= 2.0:
- print "%d nota(s) de R$ %.2f" %(c, item)
- else:
- print "%d moeda(s) de R$ %.2f" %(c, item)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement