HELP! My Jupyter notebook is not showing any outputs. : (

So I am pretty new to Jupyter notebook and have been using it for weeks now. I took a little break from studying python for a week or so and am now trying to get back to it. However, when I opened up my notebook to work yesterday I noticed that when I do enter + shift to get it to run the cell it will not give me an output. I am not sure why this is happening or how to fix it. I do know that I did update my google chrome which is where I open my Jupyter notebook up from. I also tried firefox today and that didn’t work at all.
Can someone tell me what I can do to fix this?

Can you share a screenshot?

ezgif.com-gif-maker
Here is a gif of it.

As you can see, when i run the cell it doesn’t give me an output. It is every frustrating.

Thank you very much for sharing that. I am happy to tell you that your Jupyter Notebook just works fine. It is your expection that needs to be adapted. The Jupyter Notebook only shows what the last statement of a cell evaluates to.

  1. If you define a function, this does not evaluate to anything that could be displayed. So you can’t see anything in the upper cell.

  2. In the function in the upper cell, you set the result equal to some value. But you never return the result. As you don’t have ANY return statement in the function, Python replaces that with None. Your expressions result = XXX mean nothing as you don’t return that result. The chosen name result was freely chosen by you and has no language-specific meaning in Python. After invoking your function, Python happily deletes that variable and does nothing else.

  3. As the function invocation returns None, for the lower cell there is nothing to display.

So I can tell you that everything is working fine. I wish you happy coding and nice experiences with learning Python! I hope you can find nice books or online classes that might help you with your journey.

3 Likes

Something that evaluates well that you can use in an Input cell to test in the future would be the following:

2 + 2

The output should render the result of that.

2 Likes

Ok so I feel…silly. I am taking an Udemy course online and was following along with the instructor doing this problem. I thought I had everything right and checked three times but I guess I missed a return…color me embarrassed. :sweat_smile: It also doesn’t help that it was 1:30 in the morning when I was doing it too. Thanks so much for the help! I will do better to check over my work.

1 Like

Thanks! I will use that as a way to check if its outputting anything.

I guess we all have been there :wink: It’s totally normal.