Supermarket self-service machines: how do they know......

Page may contain affiliate links. Please see terms for details.

deptfordmarmoset

Full time tea drinker
Location
Armonmy Way
The wee self-service sprite has never spoken to me, he makes me answer questions like ''are you using your own bag?'' and when I reply yes, he simply posts up ''Unexpected item in the baggage area - please seek assistance'' and refused to cooperate. At a later date I tried not using my own bag to get round his little game. ''Are you using your own bag?'' ''No'' ''Unexpected item in the baggage area....'' I found a human tescoid and asked why it did that. The tescoid shrugged and said it didn't like shopping bags being ''fluffed up.'' All I'd done was open the bag because...well...I think that's fairly self-explanatory and I get accused of fluffing up bags!

Zero sale on both occasions. Extra work for the restocker who had to return my goods to the shelf.

Tescos recent poor results actually cheered me up - it felt like payback time.
 

BigonaBianchi

Yes I can, Yes I am, Yes I did...Repeat.
I can honestly say that I have never used one of those things and not had to call over the checkout assistant...defeats the point really.

And I still think its sad to put bar codes on apples:tongue:
 

twowheelsgood

Senior Member
Problem requires only one logical statement i.e. give me the number of coins of this value to make the nearest to the sum or as many as you have. And one loop starting with the highest value denomination. The whole program to do this is only 4 statements long really.

Yes I am bored today as well as boring... I also do kids parties and bar mitzvahs.

Code:
#!/usr/bin/perl
use strict;
use List::Util 'min';
use Data::Dumper;
 
my %notesandcoins=( '5000'=>0, '2000'=>0, '1000'=>10, '0500'=>10,
  '0100'=>10, '0050'=>4, '0020'=>20, '0010'=>5, '0005'=>50,
  '0002'=>100, '0001'=>100);
 
my $sum=166;
my %change;
 
for my $value (reverse sort keys %notesandcoins) {
  $change{$value}=min int($sum/$value), $notesandcoins{$value};
  $notesandcoins{$value}-=$change{$value};
  $sum-=$change{$value}*$value;
}
 
die "Cannot make change" if ($sum);
print Dumper %change;
 

Dora

Senior Member
Location
Wigan
My colleague happened to look over my shoulder as I opened this thread. He's a programmer. 45 minutes later he's still talking. Does anyone have a shovel I could borow?
Also, in defence of self service checkouts, they're extremely useful for buying...certain items.
 

Gooner Mad Dog

Active Member
Please place your item in the bagging area!
Seek ASSISTANCE!
Please place your item in the bagging area!
'Unexpected item in the bagging area. Please remove item before continuing
Please place your item in the bagging area!
Unexpected item in the baggging area, please remove item before continuing!
Have you swiped your Nectar card?
Did you bring any of your own bags?
Seek ASSISTANCE!
Have you swiped your Nectar card?Seek ASSISTANCE!
Card accepted!
Please select how you would like to pay?
Would you like to continue shopping?
"gets irratated , wants the dosh"
Seek Assistance!!
"sighs", Your change is deposited below, thank you for shopping at Sainsburys.
Please take your items.......................
....... ...............machine waits til you have gone, then says to idle self service machine no 4 adjacent " christ Mike he was hard work" !
Mike sniggers, "someones coming pop your red light on!"
 

wiggydiggy

Legendary Member
I like them at the end of the month when I'm doing the shopping with bags of small change, rest of the time its quicker and/or less stressful to use the manned tills.
 
Top Bottom