Concept explainers
Prepare a payroll earnings statement for the sales force at the Arctic Ice Company. All of Arctic's employees are on a straight commission basis of
a.
b.
c.
Use the test data in Table 4-2 to test the program.
Want to see the full answer?
Check out a sample textbook solutionChapter 4 Solutions
Computer Science: A Structured Programming Approach Using C, Third Edition
- this code is not reading the input in doing Update vaccine quantities. The system should allow the employees to select a particular vaccine and indicate either received or distributed quantity. In either case, the quantity of the selected vaccine needs to be updated accordingly in the vaccine.txtfile.E.g. Assume that the initial quantity of Pfizer vaccine in vaccine.txt file is 1 million. When the company receives a new stock, this quantity has to be added to the existing quantity of 1 million in the vaccine.txt file. In the case where the vaccines are distributed to hospitals for vaccination, the distributed quantity has to be subtracted from the quantity available in the vaccine.txt file.Note: Whenever a vaccine is distributed to hospitals, its code and the quantity distributed need to be recorded into a text file named as dist.txt. Each vaccine is expected to be distributed more than once. Hence, while testing the program, there should be at least 10 records created in the…arrow_forwardLast Name Dev Hours Review Date Rating Salary Bonus Brody 6 1/5/2018 2 $ 19,840 Alex 8 4/1/2018 5 $ 26,700 Ashley 1 7/1/2018 4 $ 33,200 1. Use the logical if function to pay a bonus. You determine the rules for the bonus. List the rules and your steps. For example, you may use the employee rating to align with a specific bonus percentage such as 2% for a 2 rating, 5% for a 5 rating, etc.arrow_forwardYou are given a list of courses that are currently available in Oxford College that looks like the following: courses = ['CSE110','CSE111','MAT620','CSE520','EEE361','CSE650','MAT510']. All courses till 400 level (499) are for the undergraduate students whereas any courses above 500 are for the graduate or masters students. Write a python program that creates a dictionary from the above list where the keys will be each department name (CSE,EEE,MAT for the above example) and their values will be a dictionary of two keys - Undergraduate Courses and Graduate Courses. Each key will have courses that fall in Undergraduate and Graduate level respectively. Sample Input - No need to take input ['CSE110','CSE111','MAT620','CSE520','EEE361','CSE650','MAT510'] Sample Output: (You just have to print the resultant dictionary. No need to follow the pattern below) { 'CSE':{ 'Undergraduate':['CSE110','CSE111'], 'Graduate':['CSE520','CSE650'] },…arrow_forward
- Create a function to complete that commission for each driver based on the trip totalRevenue as follows: commision = (0.5*totalRevenue+25000)/60arrow_forwardWrite three functions that are the “inverses” of to_secs:1. hours_in returns the whole integer number of hours represented by a total number ofseconds.2. minutes_in returns the whole integer number of left over minutes in a total number ofseconds, once the hours have been taken out.3. seconds_in returns the left over seconds represented by a total number of seconds.You may assume that the total number of seconds passed to these functions is an integerarrow_forwardPlease complete the exercise! Thank you, i am trying to check my workarrow_forward
- Write python code which displays the sales commission based on total sale and the employee’s region, using on the following table. Total Sale Region Commission Under $2,500 East 5% $2,500 or more East 7.5% Under $2,500 West 10% $2,500 or more West 12.5%arrow_forward114. The other name of project-join normal form is a. join normal form b. trivial normal form c. sixth normal form d. fifth normal formarrow_forwardA company has 45 employers, 25 work as system developers (D) and (N) work as sales representer while (M) of them work as IT technicians. This company deals with 450 products. In the products table, each product has a name, price, size, and weight. Draw a flowchart on exel to find how many numbers of the products have a Small size(s), where there are 3 product sizes (S, M, L).arrow_forward
- Write the function truck_adjustment_factor(truck_proportion, terrain_type) that takes the proportion of trucks using the motorway and the terrain type as inputs and returns the adjustment factor that is used for calculating the highway capacity. The adjustment factor is calculated according to the following formula: adju stment factor = tprupurtime x(furtor-1) Where proportion is the proportion of trucks and the factor is the car equivalent factor for the given terrain. You should be calling your car_equivalent_factor function to get the factor - don't reinvent the wheel! For example, for rolling terrain and a truck proportion equal to 0.12: adjustment factor = 1/(1 + 0.12 x (4.0 - 1)) = 0.735 Notes: You should include (and call/use) your car_equivalent_factor function in your answer o In general, you should paste in your whole module so far in each question as later functions will call earlier functions. • You can assume the function will always be called with one of the three valid…arrow_forwardQ7:The electricity accounts of residents in a very small town are calculated as follows: if 500 units or less are used the cost is 2 cents per unit; > if more than 500, but not more than 1000 units are used, the cost is $10 for the first 500 units, and then 5 cents for every unit in excess of 500; > if more than 1000 units are used, the cost is $35 for the first 1000 units plus 10 cents for every unit in excess of 1000; in addition, a basic service fee of $5 is charged, no matter how much electricity is used. Q8:Write a program which enters the following five consumptions into a vector, and uses a for loop to calculate and display the total charge for each one: 200, 500, 700, 1000, 1500. (Answers: $9 $15, $25, $40, $90)arrow_forwardThe company « Super discounted used cars inc.» pays their employees according to this chart: 250$ per months plus 50$ per car sold. If the salesman sells more than 10 cars, the employee receives a bonus of 5% of the total of his sales, in addition to his regular salary. Each month, the owner sits in front of the computer, and enters the following information: The name of the employee, the number of cars sold, as well as the total of all the sales for the month. Write an algorithm that will calculate the salary of an employee for the month, and then display on the screen, his name, total cars sold, base salary, bonus if applicable and entire salary.arrow_forward
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE LNew Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage Learning