def get_tip_percent():
    return float(input("Enter tip percentage: "))

def calculate_total(prices):
    return sum(prices)

def calculate_tip(subtotal, tip_percent):
    return subtotal * tip_percent / 100

''' Normally something as trivial as add would not be 
created as a separate function, but it is here for 
demonstration purposes.'''

def add(number1, number2):
    return number1 + number2

def main():
    prices = [12.99, 8.50, 15.25]

    tip_percent = get_tip_percent()
    subtotal = calculate_total(prices)
    tip_amount = calculate_tip(subtotal, tip_percent)
    total = add(subtotal, tip_amount)

    print(f"Total: ${total:.2f}")

main()
