Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Python Expert

Programming exercise - Routing of telephone calls

Description

Some telephone operators have submitted their price lists including price per minute for different phone number prefixes. The price lists look like this:

Operator A:

1          0.9

268      5.1

46        0.17

4620    0.0

468      0.15

4631    0.15

4673    0.9

46732  1.1

Operator B:

1          0.92

44        0.5

46        0.2

467      1.0

48        1.2

And so on...

The left column represents the telephone prefix (country + area code) and the right column represents the operators price per minute for a number starting with that prefix. When several prefixes match the same number, the longest one should be used. If you, for example, dial +46-xx-21xxxxx you will have to pay $ 1.1/min with Operator A and $ 1.0/min with Operator B.

If a price list does not include a certain prefix you cannot use that operator to dial numbers starting with that prefix. For example it is not possible to dial +44 numbers with operator A but it is possible with Operator B.

The goal with this exercise is to write a program that can handle any number of price lists (operators) and then can calculate which operator that is cheapest for a certain number. You can assume that each price list can have thousands of entries but they will all fit together in memory.

Telephone numbers should be inputted in the same format as in price lists, for example "68123456789". The challenge is to find the cheapest operator for that number.

Requirements

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

Put your focus on the following:

? code design

? efficient data structures and algorithms

? code readability

The solution should be running with no errors or warnings when unpacked and copied into webserver's root.  Both front- and backend code should be unit tested and the unit tests should also be running with no errors or warnings.

Python, Programming

  • Category:- Python
  • Reference No.:- M9403432
  • Price:- $70

Priced at Now at $70, Verified Solution

Have any Question?


Related Questions in Python

Tasksdemonstrate data scraping of a social network of

Tasks Demonstrate data scraping of a social network of choice. Develop technical documentation, including the development of the code & detailing the results. Provide a report on the findings, that includes research into ...

Question research pythons dictionary data type dictdiscuss

Question : Research Python's dictionary data type (dict). Discuss its interface and usage. Include examples. Discuss practical applications of dictionaries.

Architecture and system integrationcase study queensland

Architecture and System Integration Case Study: Queensland Health - eHealth Investment Strategy After evaluating various platforms, Queensland Health finally decided to adopt a Service Oriented Architecture (SOA) for its ...

Question why is software configuration management

Question : Why is software configuration management considered an umbrella activity in software engineering? Please include examples and supporting discussion. The response must be typed, single spaced, must be in times ...

Below zero - ice cream storethe local ice-cream store needs

Below Zero - ice cream store The local ice-cream store needs a new ordering system to improve customer service by streamlining the ordering process. The manager of the store has found that many orders are incorrect and s ...

Show times in tmus and seconds1 an associate grasps an oven

Show times in TMUs and seconds. 1. An associate grasps an oven door within reach and pulls it open 18 inches with the left hand (he does not relinquish control of the door). With a pan in the right hand, he carefully pos ...

Question a software company sells a package that retails

Question : A software company sells a package that retails for $99. Quantity discounts are given according to the following table: Quantity Discount 10 - 19 20% 20 - 49 30% 50 - 99 40% 100 or more 50% Write a program usi ...

Questionwhat is a python development frameworkgive 3

Question What is a python development framework? Give 3 examples python development framework used today. and explain which development framework is used in which industry.

Assignment1 utilising python 3 build the following

Assignment 1. Utilising Python 3 Build the following regression models: - Decision Tree - Gradient Boosted Tree - Linear regression 2. Select a dataset (other than the example dataset given in section 3) and apply the De ...

Architecture and system integrationcase study queensland

Architecture and System Integration Case Study: Queensland Health - eHealth Investment Strategy After evaluating various platforms, Queensland Health finally decided to adopt a Service Oriented Architecture (SOA) for its ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As