Theres Something Wrong With Quiz1's Question I Think


Hi there. First, i want to thank you for creating a cool developer training environment here.

I was taking the Python Section 1 Quiz and there was a question like this;

what is the value of this variable: division = 102 / 9

and the right answer was 12.

but i think this is wrong. since 102/9 would give out a float, then the answer was supposed to be a 12.0

I might be wrong, just trying to help.



well, a simply way to find out:

print 102 / 9

go run that in a lesson, you will see the output is 12. In python2 (which codecademy uses) dividing two integers result in a integer, if needs be the number is rounded down to the nearest integer.


hmm, so this is because im using Py3 then… Didnt know this, thank you.


yes, in python3 division behavior was changed.

For what the exercises teaches (python2) the quizz answer is correct


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