-
Notifications
You must be signed in to change notification settings - Fork 0
/
Monthly Sales
47 lines (39 loc) · 1.38 KB
/
Monthly Sales
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
38
39
40
41
42
43
44
45
46
47
# Module 5 Lab-5
# The main function
def main():
monthlySales = getSales() #call to get sales
# This function gets the monthly sales
def getSales():
monthlySales = float(input('Enter the monthly sales $'))
return monthlySales
# This function gets the percent of increase in sales
def getIncrease():
#call to get the store bonus
salesIncrease = getIncrease() #call to get sales increase
salesIncrease = float(input('Enter percent of sales increase: '))
salesIncrease = float(salesIncrease)
salesIncrease = salesIncrease / 100
return salesIncrease
# This function determines the storeAmount bonus
def storeBonus(monthlySales):
if monthlySales >=110000:
storeAmount = 6000
elif monthlySales >=100000:
storeAmount = 5000
elif monthlySales >=90000:
storeAmount = 4000
elif monthlySales >=80000:
storeAmount = 3000
else:
storeAmount = 0
return storeAmount
#call to get the store bonus
storeAmount = storeBonus(monthlySales)
# This function prints the bonus information
def printBonus(storeAmount, empBonus):
print (f'The store bonus amount is ${storeAmount}')
print (f'The employee bonus amount is ${empBonus}')
if storeAmount == 6000 and empBonus == 75:
print(f'Congrats! You have reached the highest bonus amounts possible!')
# calls main
main()