Python in Jupyter: Difference between revisions

From CommunityData
No edit summary
No edit summary
Line 1: Line 1:
We are going to practice writing and running Python programs (often called "scripts").
We are going to practice writing and running Python programs (often called "scripts").
TODO:
* Make sure the notebook is in your desktop (this keeps things simple)
* Open the notebook in jupyter tab in browser.
* Notebook itself should encourage them to run some cells.


=== Download a Jupyter Notebook ===  
=== Download a Jupyter Notebook ===  
Save the file at the following link to your desktop. Then open it as you were instructed previously.  
Save the file at the following link to your desktop. Then open it as you were instructed previously.  
[https://communitydata.science/~groceryheist/CDSW_Jupyter_test_notebook%20.ipynb CDSW Jupter test notebook]
[https://communitydata.science/~groceryheist/CDSW_Jupyter_test_notebook%20.ipynb CDSW Jupter test notebook]
[[File:Champagne.png|100px]][[File:Party.png|125px]]


=== Test the notebook ===
=== Test the notebook ===
Line 16: Line 10:
   print("hello world")
   print("hello world")


You should see "hello world" output right below. If that works you have a working setup for Python and Jupyter.
You should see "hello world" output right below. If that works you have a working setup for Python and Jupyter. If that doesn't work, you should ask for assistance!
 
Feel free to play around in the notebook. Try it out and explore!
Feel free to play around in the notebook. Try it out and explore!


=== Success! You have a working Python and Jupyter setup! ===
[[File:Champagne.png|100px]][[File:Party.png|125px]]
[[Category:CDSW]][[Category:Shared Pages]]
[[Category:CDSW]][[Category:Shared Pages]]

Revision as of 23:46, 17 January 2020

We are going to practice writing and running Python programs (often called "scripts").

Download a Jupyter Notebook

Save the file at the following link to your desktop. Then open it as you were instructed previously. CDSW Jupter test notebook

Test the notebook

Following the instructions in the notebook, run the cell that says:

 print("hello world")

You should see "hello world" output right below. If that works you have a working setup for Python and Jupyter. If that doesn't work, you should ask for assistance!

Feel free to play around in the notebook. Try it out and explore!

Success! You have a working Python and Jupyter setup!