Hide the output of the code cells

Hello everyone. I am working on a project where only the output of the first cell should be visible, and the rest should not. Everything works correctly, but outputs appear like the ones attached in the image.

I don’t know how to hide the outputs of the cells while still having the code work correctly. Thank you all very much!

You should be able to hide a cell’s output by clicking on the eye icon in the toolbar at the bottom of the page when you are editing or selecting the cell. Alternatively, hit command-comma, (⌘, on macos).