Thread Shed

When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!

Hi everyone, for the Thread Shed project, I had a question about task #14. Here is the link to the project

I get a total of 5994.9599999999955, which is different from 1498 shown in the YouTube solution. I have reviewed the code and everything looks the same as the video. Could it just be because the data for sales is different from the YouTube video? Or am I making a mistake. Any assistance on this would be greatly appreciated ! :blush:

It’s difficult to tell b/c you didn’t post any formatted code.

Please post your formatted code. Use the “</>” button above in the formatting options or refer to this post:

I’m having the same issue.
If you print out customers and sales you’ll the data being printed out multiple times instead of one which is what is throwing off the actual total from 1498 to 5994.9599999999955

daily_sales_replaced = daily_sales.replace(';,;', '+')
daily_transactions = daily_sales_replaced.split(",")


daily_transactions_split = []
for transaction in daily_transactions:


transactions_clean = []
for transaction in daily_transactions_split:
  transaction_clean = []
  for data_point in transaction:  
    transaction_clean.append(data_point.replace("\n", "").strip(" "))


customers = []
sales = []
thread_sold = []

for transactions in transactions_clean:


total_sales = 0
for sale in sales:
  total_sales += float(sale.strip("$")) 


You need to fix this indentation. (You can also search here in the forums as this is a common mistake).



transaction_clean.append has to be indented and transactions_clean.append has to be at the outside level of the inner for loop, otherwise you’re cleaning, appending and then appending again, which would give you duplicates.