Welcome to the Treehouse Community
Looking to learn something new?
This code i not passing
We have a bunch of prices and sales numbers and we need to find out our total earnings.
Let's start by writing a function named product_sales that takes a single two-member tuple made up of a price and a number of units sold. product_sales should return the product of the price and the number of units.
prices = [ (6.99, 5), (2.94, 15), (156.99, 2), (99.99, 4), (1.82, 102) ] def product_sales(price, units): return price * units
Steven Parker221,451 Points
This function takes two individual arguments, but the instructions ask for a function " that takes a single two-member tuple"
So your declaration might look something like:
And of course, the body would need to be adapted accordingly.
Learn QA6,011 Points
def product_sales(one_tuple): product_sales = 21.0 return product_sales
this code passed but not sure how