Programming exercise - routing of telephone

Assignment Help Python Programming
Reference no: EM13373805

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.

Reference no: EM13373805

Questions Cloud

Nbspnbspexplain and support your thesis through the use of : nbspnbspexplain and support your thesis through the use of academically and ethically sound evidence.nbspuse proper mla
Why does tqm require the commitment of everyone in the : why does tqm require the commitment of everyone in the whole organisation?how could this be achieved in the context of
Sales tracking and customer relations analysesaimsto : sales tracking and customer relations analysesaimsto analyse a set of data in microsoft excel and write a brief report
Give an analysis of the language tone structure and meaning : give an analysis of the language tone structure and meaning of the poem praise song for my mother by grace
Programming exercise - routing of telephone : programming exercise - routing of telephone callsdescriptionsome telephone operators have submitted their price lists
The purpose of the position paper is to practice : the purpose of the position paper is to practice formulating and articulating an informed opinion that could be used to
Activity 1 - introduction to business ethics1 : activity 1 - introduction to business ethics1. introductionbehavioral ethics is a new field drawing on behavioral
Write 200 words onnbspwhat do you believe differentiates : write 200 words onnbspwhat do you believe differentiates academic writing from other types of
A strong thesis statement for my essay about heart disease : a strong thesis statement for my essay about heart disease in the african american

Reviews

Write a Review

Python Programming Questions & Answers

  The number of lowercase letters in the file

The number of uppercase letters in the file The number of lowercase letters in the file

  Program that creates a dictionary containing

Write a program that creates a dictionary containing the U.S. states as keys and their capitals as values. The program should then randomly quiz the user by displaying

  Python program that reads in a series of positive integers

Write a Python program that reads in a series of positive integers and writes out theproduct of all the integers less than 25 and the sum of all the integers greater than or equal to 25. Use 0 as a sentinel value

  Create a simple and responsive gui

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.

  Write a program that obtains integer numbers from user

Emphasize standard approaches that verify you have successfully mastered the concepts of structured design - selects a menu item, program should perform calculation, display the result to the user, and return to the main menu.

  Fill in the python code

Fill in the Python code to play Tic Tac Toe. I won't award points unless it runs succesfully. # Tic-Tac-Toe Game def drawBoard(board): # Draws the board using the list of numbers print(" ") print(" ",board[0]," | ",board[1]," | ", board[2]) print("--..

  Implement your algorithm in python

Write an algorithm in structured English (pseudocode) that describes the steps required to perform the task specified and reinforce topic material related to the programming work cycle, and the input, processing, output program structure.

  Display the percent-ages of the overall grade

Write a program that uses a bar chart to display the percent-ages of the overall grade represented by the project, quizzes the midterm exam and the final exam

  Let ll be a list of integers

Let LL be a list of integers. Use list comprehension to produce teh following lists. Each one should just take onel line. Anser questions as two comments.

  Two-dimensional word puzzle

Write a python function called find_words that finds and prints the list of valid words in a two-dimensional word puzzle

  Project will be a simple, working program

This programming project will be a simple, working program, using Python language, which utilizes a good design process and includes:Sequential, selection, and repetitive programming statements as well as,At least one function call.

  Define a function to calculate the values

Be sure to define a function to calculate the values and print the table displaying the interest rate in the first column, the monthly payment in the second column, and the total payment in the third column. Your program should not allow the user to ..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd