Help


#1



Exercise
4. Listas + Funciones


Error
Oops! Try again. Your function does not work with ['fizz', 0, 0] as input data


def fizzCount(cadena):
    count = 0
    for x in cadena:
        count = count +1
    return count
    
print fizzCount("fizz")


#2

can you provide the exercise url?

your code seems to count all elements in list, it should only count fizz


#3

The instructions say that the name of the function must be fizz_count, and count = count + 1 should only happen if x == "fizz".


#4

thanks for the reply


#5

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