python/console_print_with_function.py

7 lines
168 B
Python

# Prices of items sold today
prices = [12.99, 23.50, 4.99, 8.75, 15.00]
def total_sales(prices):
print(f"Today's total sales: $", sum(prices))
total_sales(prices)