Python Forum
Creating a change table - £0.01-£0.50?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating a change table - £0.01-£0.50?
#3
Well, I thought the Brits had done away with 1p, but the Internet says:

Quote:The following coins are legal tender in the UK: All regular circulation coins: 1p, 2p, 5p, 10p, 20p, 50p, £1 and £2 pieces;

Looks like a job for modulo! Find the biggest coin that dispenses the maximum amount of change, then work on the rest.

Someone sticks in a £5 note, but only spends £3.01, how to allocate the change?

And if some coins are already gone?
Reply


Messages In This Thread
RE: Creating a change table - £0.01-£0.50? - by Pedroski55 - Oct-19-2022, 01:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  creating a 3x3 multiplication table aditvaddi 1 3,677 Jun-18-2018, 06:05 AM
Last Post: volcano63
  Tricky estimating three models and creating a table: regression HellinPython 1 2,867 Oct-18-2017, 02:46 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020