Do you need this or any other assignment done for you from scratch?
We have qualified writers to help you.
We assure you a quality paper that is 100% free from plagiarism and AI.
You can choose either format of your choice ( Apa, Mla, Havard, Chicago, or any other)
NB: We do not resell your papers. Upon ordering, we do an original paper exclusively for you.
NB: All your data is kept safe from the public.
Good news! The multi-national corporation where you work is going to give each e
Good news! The multi-national corporation where you work is going to give each engineer a nicer office one level higher than his or her current office.
At this particular corporation, everybody’s office number looks something like “KEC 3047” or “KERR 43”. You can tell which offices are engineering offices because the engineers are all located in buildings that have 3 letters and 4 digits. Their offices are going to be one level higher.
So somebody with an office like “KEC 3047” will get to move into “KEC 4047” while people with offices like “KERR 43” will keep the current office.
Your job is to write a program that, given an old office number, can compute the new office number–testing your ability to translate a problem into a computational solution on strings.
Using your text editor, create a Python program that contains a single function called compute_new_office(current_office) that takes a single parameter named current_office.
The function should check if the current_office has a 3-letter building abbreviation (consisting only of uppercase letters) followed by a space and finally by a 4-digit number. This is an engineering office, and in this case your function should return the same building name followed by a space and followed then by a number equal to 1000 plus the original office number.
If the current_office is not an engineering office, then your function should return the current_office unaltered.
As some examples of what your function should return…
compute_new_office(“KEC 3047”) should return “KEC 4047” because it is an engineering office
compute_new_office(“MER 8888”) should return “MER 9888” because it is an engineering office
compute_new_office(“KEC 111”) should return “KEC 111” because it is not an engineering office
compute_new_office(“KX 3047”) should return “KX 3047” because it is not an engineering office
compute_new_office(“KERR 3047”) should return “KERR 3047” because it is not an engineering office
compute_new_office(“kec 3047”) should return “kec 3047” because it is not an engineering office
compute_new_office(“/KEC 3047/”) should return “/KEC 3047/” because it is not an engineering office
compute_new_office(“KEC-3047”) should return “KEC-3047” because it is not an engineering office
Do you need this or any other assignment done for you from scratch?
We have qualified writers to help you.
We assure you a quality paper that is 100% free from plagiarism and AI.
You can choose either format of your choice ( Apa, Mla, Havard, Chicago, or any other)
NB: We do not resell your papers. Upon ordering, we do an original paper exclusively for you.
NB: All your data is kept safe from the public.
Place this order or similar order and get an amazing discount. USE Discount code “GET20” for 20% discount