Stuck in Carly's Clippers exercise, point 3

Hi all!

I’m currently stuck doing the exercise of Carly’s Clippers in the Python 3 course, specifically in the point 3 and the video doesn´t helps me.

In the point 3, they ask me to create a variable called ‘average_price’ that is the ‘total_price’ divided by the number of prices.

I writted the following code:

In the walkthrough video, the developer does the same than me until here. But for any reason when I click save, it returns me the following error:

File “script.py”, line 12

                                            ^

SyntaxError: unexpected EOF while parsing

Can somebody explain me why this happens? I have the sensation that probably would be a little silly mistake but I checked my code a lot of times and I don´t find why I have an error.

Welcome to the forum! You probably want to out-dent this line, to that it only runs once after the total_price is calculated. Currently it is included inside the for code block, so it will execute once for every element in your prices list. The error you have is also due to the same line. You have a stray opening parenthesis.

average_price = total_price / (len(prices) #out-dent 2 spaces and remove the ( before len

Happy Coding!

2 Likes

Thank you very much!!

1 Like

ohh reallyy!!! thanks for solution