Create a simple and responsive gui

Assignment Help Python Programming
Reference no: EM13123220

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: EM13123220

Questions Cloud

Data relating to balances of various accounts : The 2010 income statement showed interest revenue in the amount of $4,900. You are to provide the missing adjusting entry that must have been made, assuming reversing entries are not made. For each journal entry write Dr for debit and Cr for credi..
Replenishing replenishing : Give an analysis of the language, tone, structure and meaning of the poem 'Praise Song For My Mother' by Grace Nichols?
Compute the direct materials price and quantity variances : These 5,000 puzzles used 50,000 diodes at an actual cost $0.28 per diode. All 50,000 diodes were used and there was no ending inventory. Compute the Direct materials price and quantity variances. Use the back of your answer sheet.
Which of the above costs is variable : Electricity is billed by kilowatt hour. According to its first bill, Raymondo's paid $573 for 3,000 kilowatt hours in January.
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.
Is a weight fain of kilograms unusual : Is a weight fain of 15 pounds of (6.8) kilograms unusual? Why or why not? If 15 pounds (or6.8kilograms) is not unusual does that support the legend of the "freshman 15"?
Liability at the end of the year : Sales were $15 million and actual warranty expenditures were $20,000 for the first year of selling the product. What amount should Right report as a liability at the end of the year?
Comparing equations of lines : For the pairs of lines defined by the following equations indicate with an "I" if they are identical, a "P" if they are distinct but parallel, an "N" (for "normal") if they are perpendicular, and a "G" (for "general") if they are neither parallel ..
What is the mole fraction of ethanol in this solution : A solution of ethanol (C2H6O) in water is sometimes used as s disinfectant. 1.00 L of this solution contains 553 g or ethanol and 335 g of water. What is the mole fraction of ethanol in this solution.

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

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