Answer the question
In order to leave comments, you need to log in
Why is there only 1 iteration?
Good afternoon! I’m solving such a problem
and I can’t figure out why after checking only one iteration passes for me
here is a link to the code
When an empty list is received, everything works fine, but when the list is not empty
if numbers:
for item in numbers:
count_respondents += 1
if int(item) in range(9, 11):
promoter += 1
elif int(item) in range(0, 7):
critic += 1
nps = round((promoter - critic)/count_respondents*100)
return nps
then for some reason only 1 iteration passes and the code does not work out to the end and as a result it does not count correctly. for item in numbers:
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question