May-14-2019, 08:35 PM
Following is not using chr(), so I am not doing your homework :-), but this one way of handling problem of 'multiples of 5':
>>> blocks = 'ABCDEFGHIJ' >>> floors = '01234' >>> for customer in [0, 3, 5, 7]: ... block, floor = divmod(max(customer - 1, 0), 5) ... print(f'Block {blocks[block]} Floor {floors[floor]}') ... Block A Floor 0 Block A Floor 2 Block A Floor 4 Block B Floor 1
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.