May-14-2019, 01:01 PM
Question: Write a program in Python to allocate and display Block and Floor No. on the basis of Customer Number. Assuming there are 10 Blocks ('A' to 'J') with 5 floors (0 to 4) each and allocated to customers sequentially as per their Customer Number. For example: Customef no 1 gets [Block A Floor 0], Customer no 3 gets [Block A Floor 2], Customer no 7 gets [Block B Floor 1]
NOTE: This program has to be done only using arithmetic operations and type conversions (i.e., without use of if-else)
HINT: ASCII codes for 'A','B'.. are 65, 66,... & chr(65) in python is 'A'
I am new to python and this forum so I am extremely sorry if I broke any rules
I have tried everything I can (at this stage) but I can't seem to find the logic and I am also not very familiar with chr function.
Please help me.
NOTE: This program has to be done only using arithmetic operations and type conversions (i.e., without use of if-else)
HINT: ASCII codes for 'A','B'.. are 65, 66,... & chr(65) in python is 'A'
I am new to python and this forum so I am extremely sorry if I broke any rules
![Big Grin Big Grin](https://python-forum.io/images/smilies/biggrin.png)
I have tried everything I can (at this stage) but I can't seem to find the logic and I am also not very familiar with chr function.
Please help me.