Fizz_count(['fizz', 'buzz']) returned 0 instead of the correct answer: 1


I've been stuck on this exercise for quite a while and I have no clue what I'm doing wrong. Please Help!

Write your function below!

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


if x == "fizz":

Your iteration variable is word ?


I just saw it with word as variable on another topic so I tried it but it didn't work with variable x neither


Can you format your code?
select your code and use </>

...or read this Article


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