Fizz Count...wut?


#1




I didn't get an error message. I'm being told that my code ran correctly. But...I don't think so.


This should only have passed if it printed "2", for the number of times "fizz" appears in the list.


Replace this line with your code.


#2

Hi, @gelehman ,

Your code passed because it did what the instructions asked you to have it do.

Though it is a good idea to test functions by calling them, the instructions did not ask you to do that. If you do call the function in this exercise, your submission will still pass.

This statement does not actually call the fizz_count function ...

print fizz_count

Without its following the function name with parentheses enclosing an argument list, the statement merely asks Python to output a string representation of the function object's identity, and that is what got printed. If you want to call the function, you can do this ...

print fizz_count(x)

#3

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