Please expalain this

The number is multiplied but nothing is done with result → the variable is not updated

so the answer is 42 ( The Answer to the Ultimate Question of Life, the Universe, and Everything is 42 )


But, In programming we move line by line and then the answer should be 210 as in the second line variable is multiplied to 5.

Yes, the multiplication happens, but this line:

cool_number * 5

does not update the variable, if that line was:

cool_number = cool_number * 5

then yes, the answer would be 210.

The question uses this “misdirect” on purpose I think


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