https://www.codecademy.com/courses/intro-statistics-numpy/projects/election-binomial
Whenever I try to write this code for number 3:
percentage_ceballos = total_ceballos/len(survey_responses)
It prints out 0 and I can’t understand why.
Then when I put 100 * in front of it:
percentage_ceballos =100 * total_ceballos/len(survey_responses)
It prints out 47, the desired answer.
Similarly, the answer is this:
percentage_ceballos = total_ceballos/float(len(survey_responses))
Why does that fix the problem as well?