It won't count the fizz right


#1



i feel dumb but i don't know were the put the fizzs so that the function will count it because I've tried everywhere (i think) because i always get the same error

https://www.codecademy.com/courses/python-beginner-en-IZ9Ra/0/4?curriculum_id=4f89dab3d788890003000096#

Oops, try again. fizz_count(['fizz', 'buzz']) returned 0 instead of the correct answer: 1


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


#2

In line 4, change it from

if x == 'fizz': to if item == 'fizz':

and it should work properly. Hope this helps :slight_smile:


#3

it worked thanks now i can just look at my code and understand it