Advertisement
Guest User

Untitled

a guest
Oct 12th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. while x > 0.00:
  2. if x>=50.0:
  3. print( x//50,('notas de 50 euros'))
  4. n = x % 50
  5. elif x<50 and x >=20:
  6. print (y//20,('notas de 20 euros'))
  7. x= x %20
  8. elif x<20 and x >=10:
  9. print (x//10,('notas de 10 euros'))
  10. x = x % 10
  11. elif x<10 and x >=5:
  12. print( x//5, ('notas de 5 euros'))
  13. x = x% 5
  14. elif x<5 and x>=2:
  15. print( x//2, ('moedas de 2 euros'))
  16. x = x % 2
  17. elif x<2.0 and x>=1.0:
  18. print( x//1,('moedas de um euro'))
  19. x= x%1
  20. elif x<1.0 and x >=0.50:
  21. print( x//0.50,('moedas de 50 centimos'))
  22. x = x %0.50
  23. elif x<0.50 and x>=0.20:
  24. print( x//0.20,('moedas de 20 centimos'))
  25. x = x%0.20
  26. elif x<0.20 and x>= 0.10:
  27. print( x//0.10,('moedas de 10 centimos'))
  28. x = x%0.10
  29. elif x<0.10 and x>=0.05:
  30. print(x//0.05,('moedas de 5 centimos'))
  31. x= x % 0.05
  32. elif x<0.05 and x>=0.02:
  33. print( x//0.02,('moedas de 2 centimos'))
  34. x = x %0.02
  35. else:
  36. print ( x ,('moedas de 1centimos'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement