xxxxxxxxxx
# Get user input for item details
item_name = input("Enter the name of the item: ")
quantity = int(input("Enter the quantity of {} you want to purchase: ".format(item_name)))
unit_price = float(input("Enter the unit price of {} in dollars: $".format(item_name)))
# Calculate the total cost
total_cost = quantity * unit_price
# Display the result
print("The total cost for {} {}(s) at ${:.2f} each is: ${:.2f}".format(quantity, item_name, unit_price, total_cost))