You will validate input to ensure that the user enters inputs within a certain range or larger than a certain minimum value. You will validate the inputs as follows: The user cannot enter a negative number for: Miles to kilometers Gallons to liters iii. Pounds to kilograms Inches to centimeters The user cannot enter a value above 1000 degrees for Fahrenheit to Celsius If the user enters an invalid value, then the program will issue an error message and terminate immediately. (Do NOT accept further data). Save the program as firstname_lastname_Lab3a.py where you will replace firstname and lastname with your actual first and last name. Test all conditions prior to submitting.   Part B: Write Something New! 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   The following additional conditions apply: If a salesperson has taken more than 3 vacation days in a month, their pay gets reduced by $200 A salesperson earns a bonus only if they have been with the company for 3 months or more 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:   The name of the salesperson Their longevity with the company Their base salary The commission earned (in Dollars) The bonus earned Additional bonus earned (if any) Deductions (if any) A total gross paycheck Your output should look like a paystub (NOT in paragraph format) All currency should be formatted with a $ sign and 2 decimal places (LO 1, 2, 3).   Use the IDLE programming environment.  Please save your file as firstname_lastname_Lab3b.py where you will replace firstname and lastname with your actual first name and last name. Remember to use the extension .py. Run and test your program for all conditions. Once you are sure it works you will turn in the items listed in the next section.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
  1. You will validate input to ensure that the user enters inputs within a certain range or larger than a certain minimum value. You will validate the inputs as follows:
  2. The user cannot enter a negative number for:
  3. Miles to kilometers
  4. Gallons to liters

iii. Pounds to kilograms

  1. Inches to centimeters
  2. The user cannot enter a value above 1000 degrees for Fahrenheit to Celsius
  3. If the user enters an invalid value, then the program will issue an error message and terminate immediately. (Do NOT accept further data).
  4. Save the program as firstname_lastname_Lab3a.py where you will replace firstname and lastname with your actual first and last name.
  5. Test all conditions prior to submitting.

 

Part B: Write Something New!

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

 

  1. The following additional conditions apply:
  2. If a salesperson has taken more than 3 vacation days in a month, their pay gets reduced by $200
  3. A salesperson earns a bonus only if they have been with the company for 3 months or more
  4. 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:

 

  1. The name of the salesperson
  2. Their longevity with the company
  3. Their base salary
  4. The commission earned (in Dollars)
  5. The bonus earned
  6. Additional bonus earned (if any)
  7. Deductions (if any)
  8. A total gross paycheck
  9. Your output should look like a paystub (NOT in paragraph format)
  10. All currency should be formatted with a $ sign and 2 decimal places (LO 1, 2, 3).

 

Use the IDLE programming environment.  Please save your file as firstname_lastname_Lab3b.py where you will replace firstname and lastname with your actual first name and last name.

Remember to use the extension .py.

Run and test your program for all conditions. Once you are sure it works you will turn in the items listed in the next section.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 6 steps with 10 images

Blurred answer
Knowledge Booster
Concept of Flowchart
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education