# Author: Adrian T. Neumann
# Date: 2018, Sept 17th
# Description: Hipster’s Local Vinyl Records sell and hand-deliver vinyl 
# records to their customers. Delivery is charged at a rate of $15 per kilometer. 
# All purchases are subject to a 14% sales tax. 
# Because this store loves retro technology, you have been asked to 
# develop a console application solution that will enable the company’s retail 
# staff to calculate receipts. Begin by designing your solution to this problem 
# in pseudocode, which will be submitted along with the program. The program user must 
# be able to input the customer's name, the number of kilometers distance, and the cost 
# of any records purchased. Once the input is provided, the program will display the 
# customer's name and three calculated costs: delivery cost, records cost (plus tax) 
# and total cost, as shown below.



def main():
 
 
    # Input and Variables
    # Collect distance to deliver and purchase cost of records from user
    DeliveryCost = 15
    Tax = 0.14
    UserName = input("Please enter your name: ")
    DeliveryDistance = float(input("Enter the total distance to deliver purchase of records: "))
    PurchaseCost = round(float(input("Enter the purchase price of records: $")),2)
    print("\n")
    
    # Processing
    # Calculated delivery cost, purchase cost, and total cost
    TotalDeliveryCost = DeliveryCost * DeliveryDistance
    RecordPurchaseCost = PurchaseCost + PurchaseCost * Tax
    TotalCost = TotalDeliveryCost + RecordPurchaseCost
    
    # Output
    print("Purchase summary for " + UserName)
    print("Delivery cost: ${:.2f}".format(TotalDeliveryCost))
    print("Purchase cost: ${:.2f}".format(RecordPurchaseCost))
    print("Total cost: ${:.2f}".format(TotalCost))	
    
    
if __name__ == "__main__":
    main()
