10. A day at the supermarket - Need help


#1

Help please, can't do this right

# Write your function below!
def fizz_count(x):
    count = 0
    for item in x:
        if item == "fizz":
            count = count + 1
        return count

lis = ['pen','paint','paper','fizz','eraser','fizz','glue','fizz']
fizz = fizz_count(lis)
print fizz

#2

Too much indentation. It should line up with the for.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.