To create and add the customer record to the database

Assignment Help Database Management System
Reference no: EM132080149

You need help using the Python to write this program (Python Question): Please see the question below:

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:

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.

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".

Reference no: EM132080149

Questions Cloud

Find a list of courses where the percentage of students : List of professors that work for departments with more than 20 faculty members and that offer more large sections than small and medium sections combined.
What is the income velocity of money in freedonia : The money supply is growing at 12% per year and real income, Y, is growing at 4% per year.
Price of a chinese-made car : Which does an increase in the price of a Chinese-made car that is popular among U.S. consumers show up in?
Write a program that transmits a series of characters : Write a program that transmits a series of characters (in C).The sequence will consist of "AlphaNumber", where Alpha is meant to be a letter.
To create and add the customer record to the database : Program should use a function, generateRecord, to create and add the customer record to the database (a dict that stores customers' information).
What would be the reasons for your selection : Which of the two methods would you select to use? What would be the reasons for your selection?
Compute the final percentage score for each student : Write an awk script called activity6.1-8.awk that compute the final percentage score for each student, as well as the class average
Watch the episode of simpsons bart gets an elephant : Watch the episode of The Simpsons "Bart Gets an Elephant". In the episode, the Simpsons find that their pet elephant
Write a method called totalhours that takes three integer : Write a method called "totalHours" that takes three integer arguments (number of weeks, number of days, number of hours) and returns the total integer hours.

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

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