If the customer has his/her personal bag which is not allowed
in the supermarket, his/her personal bag is kept at the
entrance of the supermarket and the system allocates him/her
an empty compartment number. This is the compartment
where the customer’s personal bag will be kept then he/she
proceeds to do his/her shopping.
1
Expert's answer
2020-07-07T09:55:10-0400
def system(has_bag=True):
global compartment
if not has_bag:
return True, None
for cell in compartment:
if cell.empty:
cell.empty = False
return True, cell.key
return False, None
Comments
Leave a comment