PythonA DAY AT THE SUPERMARKET what should iput i the parameters


im a bit confused
why put x in the parameters rather than count or item?

or generally what is supposed to be in the parmeters in a for loop?

code(is correct):
x = [“fizz”,“cat”,“fizz”]

Write your function below!

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


Becuase the function takes the list as input and gives out the count as output.


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