Create a dictionary that will be used to store customer

Assignment Help Management Information Sys
Reference no: EM132124456

Respectfully, Please see the structure for the program I'm trying to write using Python.

Below is how the program should be structured.

1. Program general structure: Function definitions should be at the top of the program Create a dictionary that will be used to store customer information Have an infinite while loop:

1. Within the while loop, user should be prompted for the service information: Name, Income, consulting time -- If the user does not enter a value exit the loop

2. Pass the service information to the generateRecord Function

3. Within the generateRecord function

a. Generate the customer id and store it in a variable

b. Call the generateBillAmount Function

1. Pass the income and consulting time

2. Based on the income, determine billing and return bill amount

c. Store the billing amount returned by generateBillAmount into a variable

d. Store the customer information into a tuple: name, income, consulting time, billingAmount

e. Add the customer id and record into the dictionary -- key/value pair Once the loop exits, print the contents of the dictionary

Please see the actual problem below:

2. During the tax season, every Friday, the J&J accounting firm provides assistance to people who prepare their own tax returns. Their charges are as follows:

a. If a person has low income (<= 25,000) and the consulting time is less than or equal to 30 minutes, there are no charges; otherwise, the service charges are 40% of the regular hourly rate for the time over 30 minutes.

b. For others, if the consulting time is less than or equal to 20 minutes, there are no service charges; otherwise, service charges are 70% of the regular hourly rate for the time over 20 minutes. (For example suppose that a person has low income and spent 1 hour and 15 minutes, and the hourly rate is $70.00. Then the billing amount is 70.00 X 0.40 X (45 / 60) = 21.00).

Write a program that prompts the user to enter the customer first and last name, hourly rate, the total consulting time, and income. Once the customer information is entered, the program should generate and store a record for the customer.

The customer record should include a 6-digit customer id (customer id will be generated by the program). The customer id should be used as a key to retrieve the customer information (first and last name, income, hourly rate, consulting time, income, and billing amount).

Program should use a function, generateRecord, to create and add the customer record to the database (a dict that stores customers' information). generateRecord function takes first and last name, hourly rate, the total consulting time, and income as arguments. The program should calculate the billing amount and append/include it in the customer record.

Your program must contain a function, generateBillAmount that takes as input the hourly rate, the total consulting time, and the customer income.

The generateBillAmount should return the billing amount. The program should use a loop to process multiple customers. To exit the loop, the user should hit enter without entering customer information.

Upon exiting the loop, the program should print each customer information. If the database does not contain data, the program should print the following: " No customer to print"

Note: Customer information (first and last name, income, hourly rate, consulting time, income, and billing amount) must be stored in a tuple

Reference no: EM132124456

Questions Cloud

Balance of retained earnings : What was the beginning balance of retained earnings at the start of this year?
What is net present value in terms of evaluating a project : What is Net Present Value in terms of evaluating a project? What is better NPV or Internal Rate of Return when evaluating?
Determine the rate of return on shareholders : Determine the rate of return on shareholders' capital for each of the financing alternatives if the rate of return on assets turned out to be as follows:
Exclusive investments projects : A firm is considering the two mutually exclusive investments projects. Project Alpha requires an initial outlay of $600 and will return $160 per year
Create a dictionary that will be used to store customer : Create a dictionary that will be used to store customer information Have an infinite while loop.
Market-to-book ratio and the market-to-book ratio : The Company Metallica Heavy Metal Mining needs to diversify its operations. Some recent monetary information shown here:
Describe the various business and it problems : Describe the various business and IT problems that can be caused by lack of common information and an enterprise IM strategy.
What will be the value of? matt account : What will be the value of? Matt's account in 9 years with his quarterly payments if he is earning 6.5?% ?(APR), 11% ?(APR), or 14.5% ?(APR)?
Propose a use case scenario for reusing architectural model : Reusability of prior designs is critical when creating best-practice solutions in the enterprise.

Reviews

Write a Review

Management Information Sys Questions & Answers

  Piracy and softwaremost computer software carries a warning

piracy and softwaremost computer software carries a warning against copying yet many people feel the warning is

  Develop an awareness presentation to outline storage plan

The CIO feels the risk is too high and wants you to develop an Awareness presentation and Information Guide handout to outline the Pros and Cons of this storage

  How do the security considerations for temporary or

part 1 review questions what are some of the factors that influence an organizations hiring decisions? what are the

  Write a letter to the graduate school of law enforcement

Writing sample 1000-1500 words in length emphasizing academic, nonacademic, and employment experiences relevant to the degree.

  List the top ten business trends for it

List the top ten business trends for IT.For each trend, describe why businesses are focusing upon that trend.

  Write an introductory statement of the company

Determine at least five (5) information technology personnel / roles that would be in place in order to start the business venture of gaining better traction.

  What should you know about website privacy

What should you know about website privacy? How do you know when an online transaction is secure? Why is Anti-spyware software important to my online security?

  How important is it to our success and survival

Are we prioritizing IT investments and targeting our development efforts in the right areas? Are we spending money efficiently and effectively?

  How it could be used to enhance the companys strengths

Then, write a paper suggesting how IT could be used to enhance the company's strengths, lessen the company's weaknesses, take advantage of the company's opportunities, and / or mitigate the company's threats.

  What examples of convergence are shown in the case study

What examples of convergence are shown in the case study - What types of data and signals are being used in the project and where?

  What kind of mitigations would you recommend for protection

Why was it so much more effective than previous BotNet designs? What kind of mitigations would you recommend for protection?

  Discussion of how the selected product could be used

Configuration management is a first-line defense against attacks intended to compromise the security and integrity of software applications.

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