Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

bartleby

Concept explainers

Question

Here is the guideline, I found the same question on here, but I wanted to ask specific questions for myt understanding.

Write a complete and syntactically correct Python program to solve the following problem:
You are the payroll manager for SoftwarePirates Inc. You have been charged with writing
a package that calculates the monthly paycheck for the salespeople. Salespeople at
SoftwarePirates get paid a base salary of 2000ドル per month. Beyond the base salary,
each salesperson earns commission on the following scale:
Sales Commission Rate Bonus
<10000ドル 0% 0
10000ドル – 100,000ドル 2% 0
100,001ドル - 500,000ドル 15% 1000ドル
500,001ドル - 1,000,000ドル 28% 5000ドル
>1,000,000ドル 35% 100,000ドル

Defining my variables:
vacation_days
base_salary

The following additional conditions apply:
1. If a salesperson has taken more than 3 vacation days in a month, their pay gets
reduced by 200ドル
So my initial question is would I create a variable day like:
variable = vacation_days
vacation_days = float(input"please enter no. of Vacation Days.")
So then the user would be prompted for the number of days?
then indented under
if vacation_days>3
base_salary - 200


2. A salesperson earns a bonus only if they have been with the company for 3
months or more
3. For salespeople who have been with the company for 5 years or more and who
have made sales greater than 100,000ドル an additional bonus of 1000ドル is added.
All input to the program will be interactive from the keyboard. The output of the program
will include:

a. The name of the salesperson
b. Their longevity with the company
c. Their base salary
d. The commission earned (in Dollars)
e. The bonus earned
f. Additional bonus earned (if any)
g. Deductions (if any)
h. A total gross paycheck
i. Your output should look like a paystub (NOT in paragraph format)
j. All currency should be formatted with a $ sign and 2 decimal places


Expert Solution
Check Mark
Still need help?
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

I can understand most of the logic behind the code, but the indentations and organizing is where I get confused. It doesn't display well on Bartleby.

I run the program and it says raw_input isn't defined.

I also get confused with the raw input, as we've only been exposed to float and int input.
Could I modify these to name = float(input("enter your name)
etc. ?

the integer and raw_input part is the only part that sort of confuses me aside from indentation

Solution
Bartleby Expert
by Bartleby Expert
SEE SOLUTION
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

I can understand most of the logic behind the code, but the indentations and organizing is where I get confused. It doesn't display well on Bartleby.

I run the program and it says raw_input isn't defined.

I also get confused with the raw input, as we've only been exposed to float and int input.
Could I modify these to name = float(input("enter your name)
etc. ?

the integer and raw_input part is the only part that sort of confuses me aside from indentation

Solution
Bartleby Expert
by Bartleby Expert
SEE SOLUTION
Knowledge Booster
Background pattern image
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
    Recommended textbooks for you
    Text book image
    Database System Concepts
    Computer Science
    ISBN:9780078022159
    Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
    Publisher:McGraw-Hill Education
    Text book image
    Starting Out with Python (4th Edition)
    Computer Science
    ISBN:9780134444321
    Author:Tony Gaddis
    Publisher:PEARSON
    Text book image
    Digital Fundamentals (11th Edition)
    Computer Science
    ISBN:9780132737968
    Author:Thomas L. Floyd
    Publisher:PEARSON
    Text book image
    C How to Program (8th Edition)
    Computer Science
    ISBN:9780133976892
    Author:Paul J. Deitel, Harvey Deitel
    Publisher:PEARSON
    Text book image
    Database Systems: Design, Implementation, & Manag...
    Computer Science
    ISBN:9781337627900
    Author:Carlos Coronel, Steven Morris
    Publisher:Cengage Learning
    Text book image
    Programmable Logic Controllers
    Computer Science
    ISBN:9780073373843
    Author:Frank D. Petruzella
    Publisher:McGraw-Hill Education