An exception was raised for fizz_count


#1



Replace this line with your code. 

def fizz_count(x):
    count=0
    for item in x:
        if item =="fizz":
            count=count+1
            x=["fizz","buzz"]
            count=fizz_count(x)
            print count
                # Write your function below!


#2

your indention is not so good. The function call is inside the function (change the indention so it is outside the function), the list which you pass into the function as argument should also be defined outside the function

Do you have the exercise url?

Also, depending on the exercise you need to return the count, but i don't see a return keyword anywhere


#3

here you gohttps://www.codecademy.com/courses/python-beginner-en-IZ9Ra/0/4?curriculum_id=4f89dab3d788890003000096


#4

https://www.codecademy.com/courses/python-beginner-en-IZ9Ra/0/4?curriculum_id=4f89dab3d788890003000096


#5

Did you make any changes i suggested? If so, can i see an updated version of your code?


#6

after your correction https://www.codecademy.com/courses/python-beginner-en-IZ9Ra/0/4?curriculum_id=4f89dab3d788890003000096


#7

the only reason i wanted the url, was so i could find the exercise, it will just load my own code, you will have to post an updated version of your code


#8


#9

more people who use windows xp.

Anyway, sorry, got distracted. Uhm.. your function call and so on is still inside your function (should be no indent) and there is still no return count (also think careful how that one should indented)

If more help is required, post an updated version of your code, and if you want to save yourself some time learn how to make indent show on the forum:

Quit useful


#10

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