-
Notifications
You must be signed in to change notification settings - Fork 1
/
sales.py
37 lines (29 loc) · 1.11 KB
/
sales.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Python program to find the total sales of a Salesman
def salesReport(salesRecord):
totalSales = sum(salesRecord)
if totalSales >= 80000:
remarks = "Excellent"
elif totalSales >= 60000:
remarks = "Good"
elif totalSales >= 40000:
remarks = "Average"
else:
remarks = "Work Hard"
if totalSales >= 50000:
commission = totalSales * 0.05
else:
commission = 0
return totalSales, commission, remarks
salesRecord = [15000, 20000, 25000, 30000]
# Call the function
totalSales, commission, remarks = salesReport(salesRecord)
print("Total Sales: ", totalSales)
print("Commission: ", commission)
if remarks == "Excellent":
print("Great job! You exceeded your sales target.")
elif remarks == "Good":
print("Well done! You made good sales this month.")
elif remarks == "Average":
print("Good effort! Keep working to improve your sales.")
else:
print("You need to work harder to meet your sales targets.")