Trouble in "A day at the supermarket"


def fizz_count(x):
for item in x:
if item=="fizz":
return count
print small

my code doesnt run the panel it appears the number 1 instead of 2.can u help me?


Hey, please insert your code with indents. Paste your code, select it and press Ctrl + Shift + C or even better place it between three backticks/backquotes before your code and three backticks/backquotes after your code.

Also remove small and try with print fizz_count(a) probably it won't solve your problem but it's shorter way.


check if the "return count" is outside of the for loop.