Advertisement
Guest User

Untitled

a guest
Jan 29th, 2020
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. wartosc_do_wydania=float(input("podaj ile wydać"))
  2. print(wartosc_do_wydania)
  3. monety={5:10, 2:2, 1:14, 0.5:32, 0.2:32, 0.1:1}
  4. ilosc=0
  5. for x in monety:
  6. ilosc=ilosc+wartosc_do_wydania//x
  7. print(x,int(wartosc_do_wydania//x))
  8. wartosc_do_wydania=wartosc_do_wydania%x
  9. if wartosc_do_wydania<0.1:
  10. break
  11. print(int(ilosc))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement