How'd you know if you're counting fizz ?
You're iterating over every element of loop, but you had to find if any item is fizz,If it is fizz then you've to increase counter by 1!
Lets see whats your code really O/P's --
def fizz_count(x): # Defined a function
count = 0 # Created a variable to count
for word in x: # Looping over each item of list , word is an iteration variable
count = count + 1 #At every iteration/looping you're incrementing count by 1
return count # After your for loop gets finished you return the count variable
# So overall your function is counting number of elements inside it.
number = fizz_count(["fizz", "flop", "fizz"]) # It will return 3 as your function counts items of a lits
print number # 3
So Now we know what your code does and also know what we wanted to do..
We wanted to count frequency/occurrence of "fizz".
I hope it helps! You're just one step close to the answer!
do reply if it helped you or not!