Please fill the two blanks


#1

def fizz_count(x):
count = 0
for item in x:
if ____:
return count + _______ #number of fizz
else:
return count
print count

we have to count the number of 'fizz' in a given list.


#2

You do know that
if the Python interpreter will bomb-out of the fizz_count()-function
and your print-statement shall NEVER be reached
and your 'fizz' count wouldn't be correct....

def fizz_count(x):
    count = 0
    for item in x:
        if  ____:
            return count + _______      #number of fizz 
        else:
            return count
    print count

#3

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