Carly's clippers question

Hello! I’m hoping this is a quick fix and that I’m missing something simple. I am currently doing the exercise Carly’s Clippers (https://www.codecademy.com/courses/learn-python-3/projects/python-carlys-clippers) and i am someone who looks at the solutions at the end when they’re available; which this exercise has a YT video solution (Python Loops Carly's Clippers - YouTube). I thought i had gotten everything done correctly, but something is printing differently than intended and im not sure why. I have gone line through line (or so i thought…) and can’t figure out what im missing.

I will try to keep the rest of this brief and to the point, but im a rambler…
the tasks at hands are 7-10ish where i must print the total revenue.
my code for this section and the output im getting are:

I can’t add more than one image as a new member, but the youtube solution has total revenue printing once with the correct number.

my issue is that im print 8 revenues rather than just the final one. any help as to what im doing would be greatly appreciated. one note to add: I originally did not have the “${0}”.format()" part of the code, i added that to perfectly match it and it was still weird. Thanks!

Double check the indentation in that section of code (total_revenue).

Summary

More specifically, the print() statement.

As you have it written now, it’s looping through the list and printing the revenue for each style, rather than the final revenue total. Don’t be afraid to move the indentation around to see what does and doesn’t output.

1 Like

perfect! That indention is going to be the death of me… Thank you for the quick answer!

1 Like