# Arup Guha
# 9/16/2020
# Solution to COP 2930 Homework #3 Part A: Sale Commission

# Some "constants" to make the program more readable.
PAY_PER_HOUR = 8
INIT_BONUS = 5
MAX_BONUS = 15
SALES_GOAL = 10

# Get user input.
hours = int(input("How many hours did you work this week?\n"))
sales = int(input("How many sales did you make this week?\n"))

# Base salary.
money = hours*PAY_PER_HOUR

# All sales are the basic bonus
if sales <= SALES_GOAL:
    money += sales*INIT_BONUS

# This is a harder case - first we get the basic bonus for all sales
# up to our goal. Then, we add in the max bonus for all the sales
# beyond the sales goal.
else:
    money += (SALES_GOAL*INIT_BONUS + (sales-SALES_GOAL)*MAX_BONUS)

# Display the result.
print("You made",money,"dollars this week!\n")
