Here's my code:
# Constants
BASE_PRICE = 24.99
SALES_TAX_RATE = 0.07
SHIPPING_HANDLING_COST = 1.0
# Input
quantity = int(input("Enter the number of Widgets being purchased: "))
# Calculations
subtotal = BASE_PRICE * quantity
shipping_handling = SHIPPING_HANDLING_COST * quantity
sales_tax = subtotal * SALES_TAX_RATE
total = subtotal + shipping_handling + sales_tax
# Output
print("Receipt for Widgets' Purchase")
print(f"Quantity: {quantity}, Base Cost: ${BASE_PRICE:.2f}, Subtotal: ${subtotal:,.2f}")
print(f"Shipping & Handling: ${shipping_handling:.2f}")
print(f"Sales Tax: ${sales_tax:.2f}")
print(f"Total: ${total:.2f}")