I am a little confused with this exercise:
I have a list with 3 'Fizz' items. But my code only picks up 2 ( or 1 less depending how many i put in there.)
Im unsure as to what I'm doing exactly with the count variables. Could someone kind enough please explain the logic behind this and how it relates to running the code
General question with codecademy. Why do some exercises not require a print statement or any return in the console so we can figure out if our code is actually correct ? For instance, here before i included my own list (and in doing so) i receive a pass for this exercise and can move on. However, the code seems wrong.
Any help greatly appreciated.
# Write your function below! def fizz_count(x): count = 0 for item in x: if item == "fizz": count = count + 1 return count kurtis = fizz_count(['fizz', 4, 4, 'fuzz', 'fizz', 8]) print kurtis