A Day at the Supermarket 4/13 (Lists + Functions)


def fizz_count(x):
count = 0
for item in x:
if item == "fizz":
count = count + 1
return count


Hi this is my code and it keeps on coming up with this error...

I would be very grateful if you could assist me in this matter as I am a beginner in coding
Many thanks in advance!


We can't tell for sure because the code sample is not posted so it can be read. However, this error usually indicates the wrong indentation on the return statement.

There should only be one four-space indent on that line so that it lines up with the for statement.


Ok I will give that a go.