Pluto show_image course Computational Thinking

I am following the lectures of the course Computational Thinking, MIT 18.S191. I would like to run the function show_image() used extensively in class 8. The course provides a Pluto notebook here.

I create a new Pluto notebook to follow the lecture. I run the first block with the setup provided by the notebook in the link above. The setupt adds several packages. However, when I try to execute show_image() , I receive the message UndefVarError: show_image not defined.

On the other hand, when I simply run the entire notebook provided by the course, the function show_image() runs. In principle, running the setup block as I do above would allow the execution of this function. However, when I include myself this block in a new notebook, it does not work. How can I solve this problem?

The function is defined in a cell at the end of the notebook. Pluto allows you to define cells in any order; it works out the order in which they should be run.

2 Likes

This is great! Thank you. I saw in the Appendix. I have just run the cell with the definition of the function in the new notebook and it works fine. I am following your class 8. I teach a course with Matlab (for Economics) and I want to incorporate Julia. Congratulations for your course! Best

3 Likes