Reinforce topic material on simple functions

Assignment Help Python Programming
Reference no: EM13186524

Aussie Best Car (ABC)declares that based on its yearly sales it will award a bonus as follows. The bonus will be equally distributed among all employees.

Yearly Sales

Bonus

$0 - $500,000

0.1% of the total yearly sales.

$500,001 - $1,000,000

$500 PLUS 0.2% of the total yearly sales volume above $500,000

$1,000,001 - $5,000,000

$1500 PLUS 0. 3% of the total yearly sales volume above $1,000,000

$5,000,001 - $10,000,000

$13,500 PLUS 0.4% of the total yearly sales volume above $5,000,000

Above $10,000,000

$33,500 PLUS 0. 5% of the total yearly sales volume above $10,000,000

The Managing Director ofAussie Best Car (ABC)has now requested you to extend your program of Assignment 1 so that it also calculates the bonus amount (in dollars), which will be awarded to the employees, based on the above table.

The program needs to calculate the total bonus based on the total sales amount of all three types of cars.

The program also needs to calculate the bonus amount (in dollars) contributed by the sales of each car type. The bonus amounts contributed by the sales of Toyota Kluger, Nissan Patrol and Ford Territory are calculated separately using the proportion of the sales of an individual car type to the total sales. For example, if the sales amount of Toyota Kluger is 60% of the total sales amount then the bonus contributed by Toyota Kluger is 60% of the total bonus.

Note that the total bonus is determined based on the total sales of all cars (not based on the sales of an individual car type) using the above table.

The program should display (in addition to what it displayed for A1) the total bonus and the bonus contributed by the sales of each car type separately.

 

Select 3 sets of test data that will demonstrate the correct 'normal' operation of your program. Select another 2 sets of test data that will demonstrate the "abnormal" operation of your program. Set these out in the same format as in Assignment 1.

Implement your algorithm in Python.

Avoid duplicate code. For example, do notcalculate the bonus in multiple places in your code.

Comment your code as necessary to explain it clearly.

Run your program using the test data you have selected and save the output it produces in a text file.

Submit:

1. Your algorithm.

2. The table recording your chosen test data.

3. Source code for your Python implementation.

4. Output listings demonstrating the results of using the test data.

It is important that the output listings are not edited in any way.

Rationale

Reinforce topic material on simple functions.

Reinforce topic material on decision structures and Boolean logic.

Reference no: EM13186524

Questions Cloud

State what is the delta u for the process : How much energy is dissipated as heat, which is exchanged btwn the system and the heat-sink?C. What is the delta U for the above process?
Write an algorithm in structured english : Write an algorithm in structured English (pseudocode) that describes the steps required to perform the task specified and implement your algorithm in Python.
How sea turtle populations have started to increase : In Costa Rica, only a few beaches remain that are nesting grounds for sea turtles. Some of those beaches have communities situated near them; traditionally, the local people collected the turtle eggs and sold them for their purported aphrodisiac p..
State what is the amount of heat involved in calories : Calories given off when 83g of water cools from 48 degrees Celsius to 27 degrees Celsius.
Reinforce topic material on simple functions : Select 3 sets of test data that will demonstrate the correct 'normal' operation of your program. Select another 2 sets of test data that will demonstrate the "abnormal" operation of your program.
Explain what is the molar mass of the compound : You dissolve the sample in .550 mL of water and determine that the osmotic pressure of the resulting solution is .107 torr at 35 deg C (760 torr = 1.00 atm). What is the molar mass of the compound?
Define an electron is confined to a linear region : An electron is confined to a linear region with a length of the same orderas the diameter of an atom (about 100 pm).
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.
Explain a sample obtained from that mixture : A sample obtained from that mixture containing 443900 particles weighs 10.0g. Determine the number and percent relative standard deviation of NaCN particels from a sample of the mixture weighing 7.16g.

Reviews

Write a Review

Python Programming Questions & Answers

  The initial number for generating the sequences

Then, after the functions, read in the initial number for generating the sequences. Here, check that it is a positive integer. If it is not, give an error message and exit the program.

  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.

  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.

  Write a program to receive a series of numbers

Write a program to receive a series of numbers (including decimal) from the user until enter key is pressed. Process the input data and display number count, sum and average. Use proper data type and format.

  Write a function rmduplic(l), where l is any list

Write a function rmDuplic(L), where L is any list. The function should return a list M that contains the same items as L, except that repetitions (duplicates) have been removed: only the first occurrence of each entry is kept (i.e., order is prese..

  Improve the structural design - haunted house game

List the things you changed and the purpose of changing it. Good reasons include making code easier to read and easier to navigate when modifying it.

  Same directory as your program

In the same directory as your program, create a file FF1, and write into it Hello (with a space at teh end). Similarly, create a file FF2, and write into it world! (with a new line, i.e., an ENTER at the end). And create a file DD and write into i..

  The program should allow the student

The program should allow the student to enter the answer. If the answer is correct, a message of congratulations should be displayed. If the answer is incorrect, a message showing the correct answer should be displayed.

  The function should return the day name (''su'',''mo''..etc)

Write the function day(d,m) where m is an integer from 1 through 12 expressing a month, and d is an integer from 1 through 31 expressing the day part of a date in 2014.

  When we sort a list of items, we need a basis

When we sort a list of items, we need a basis on which to compare the items to see whether one is bigger than another. If it's a list of numbers, Python just compares the numeric values; if it's a list of strings, Python compares the strings alpha..

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

  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.

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