Lists + Functions


#1

Can someone help me I keep on getting the same error: File “python”, line 7
return count
^
IndentationError: unexpected indent
Here is my code:

Write your function below!

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


#2

Looks like your code isn’t properly formatted. This is how it SHOULD look:

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