discovery icon indicating copy to clipboard operation
discovery copied to clipboard

Add more details on _y

Open Arthur-Milchior opened this issue 2 years ago • 3 comments

I found

Let's inspect those stack/local variables

confusing. Indeed, the sentence mentions multiple variables, but a single one was inspected. It was even more surprising because when I entered print _y, I got the result 42. (I later understood that it is because the code was run twice, and the value assigned on first run)

For the sake of the consistency, it seems also interesting to mention what the learner would get if they were trying to read _y, its address, and maybe also why they could get the correct answer while the value is unitialized.

I considered mentioning that this statement could be checked by switching from 42 to any other number just before running. This would ensure _y can not be initialized.

Arthur-Milchior avatar Nov 12 '22 14:11 Arthur-Milchior