Stuck on 4/13


For some reason I keep getting the error "fizz_buzz doesn’t look like it is a function!"
No where in the task or my code does fizz_buzz exist. My code is outputting the corect answer for fizz count but always getting this error so can’t continue

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

words = ["fizz", "no", "yolo"]
fizz_count = fizz(words)
print fizz_count


Well, you didn’t quite follow the instructions:

Write a function called fizz_count


Im actually so dumb thanks


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