Create a program that will read in a Salesperson name, employment status (1=Full-time AND 2=Part-time) and the sales amount.
In the Output, display the salesperson name along with the commission amount earned. The commission rate for full-time is 4% while for part-time is 2%.
Lastly, your program must also display the text “You have exceeded the sales quota!” if the following conditions are met:
Full-time and sales is over 1000
Part-time and sales is over 500
Use the Console for the Input and Output.

Respuesta :

Answer:

Written using Python

name = input("Name: ")

print("1 for Full time and 2 for Part time")

status = int(input("Status: "))

sales = float(input("Sales Amount: "))

if status == 1:

     commission = 0.04 * sales

else if status == 2:

     commission = 0.02 * sales

print(name)

print(commission)

if status == 1 and sales>1000:

     print("You have exceeded the sales quota!")

if status == 2 and sales>500:

     print("You have exceeded the sales quota!")

Explanation:

I've added the full source code as an attachment where I used comments to explain some lines

Ver imagen MrRoyal