4/13 A Day at the Supermarket


#1



Here's the link: https://www.codecademy.com/en/courses/python-beginner-en-IZ9Ra/0/4?curriculum_id=4f89dab3d788890003000096


Hi! I can't quite figure out what's wrong here. Exercise 4 of 13 at the Day at the Supermarket chapter of the Python course.
The error I get is "Oops, try again. an exception was raised for fizz_count(['fizz', 'buzz']): maximum recursion depth exceeded"

def fizz_count(x):
    count = 0
    for item in fizz_count(x):
        if item == 'fizz':
            count += 1
    return count

Thanks!


#2

Can you provide a link to the exerciseyou are on?


#3

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


#4

Oh, nevermind I found the mistake right here:

You are trying to call the same function inside the function....I see what you were trying to do, but that's an invalid way. You don't need to define that the item should be from that specific function, considering the fact the for loop is in the function. It should be:

for item in x:

Dos that make sense now?


#5

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