Skip to content

Added information on alternative "CTRL+Return" cell execution. #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 23 additions & 25 deletions 01_jupyter_howto.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"\n",
"What is an interactive Python notebook? It is a notebook that mixes documentation (like this!) with Python code (like below), with the output of that code.\n",
"\n",
"For example, below is the Python code to print \"Hello World\". Click on the below code and then press \"SHIFT+Return\". You should see that the code is run, and below \"Hello World\" will be printed."
"For example, the cell below contains the Python code to print \"Hello World\". Click on the below code and then press \"CTRL+Return\". You should see that the code is run, and below \"Hello World\" will be printed."
]
},
{
Expand All @@ -31,9 +31,28 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The above code is interactive because it runs when you pressed \"SHIFT+Return\". It is also interactive because you can change it. For example, click again on the code and change \"Hello World\" to \"Hello Jupyter\". Press \"SHIFT+Return\" again and you should see \"Hello Jupyter\" printed.\n",
"The above code is interactive because it runs when you pressed \"CTRL+Return\". It is also interactive because you can change it. For example, click again on the code and change \"Hello World\" to \"Hello Jupyter\". Press \"CTRL+Return\" again and you should see \"Hello Jupyter\" printed.\n",
"\n",
"A code cell can have as much or little Python in it as you want. The below cell defines a function and then runs it in a loop. What do you think will be printed out when you select it and press \"SHIFT+Return\"? Have a go. Are you right?"
"Pressing \"CTRL+Return\" repeatedly allows you to re-run the contents of a cell many times. Try repeatedly running the cell below."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from random import randint\n",
"print(randint(0, 10))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"A code cell can have as much or little Python in it as you want. The below cell defines a function and then runs it in a loop. What do you think will be printed out when you select it and press \"CTRL+Return\"? Have a go. Are you right?\n",
"\n",
"Try pressing \"SHIFT+Return\". This time, as well as the cell being executed, the focus moved to the cell below. By continually pressing \"SHIFT+Return\" you can navigate through a notebook cell-by-cell."
]
},
{
Expand Down Expand Up @@ -280,13 +299,6 @@
"Have a play. Explore the buttons and menu items. Take a look at the \"Help\" in the menu. Remember that, if everything goes wrong, you can always click \"Stop\" or select \"Kernel | Restart & Clear Output\" from the menu."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -368,13 +380,6 @@
"Alternatively, you can save a copy of this notebook under a different name by clicking \"File | Make a Copy...\" in the menu. You can then copy this file or send it to someone else. As a notebook contains the code, data, outputs and analysis, sharing notebooks is the closest thing we have to interactive papers. This is a really powerful concept and, I believe, will fundementally change how we report and share the results of computational and data analysis in science."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -437,13 +442,6 @@
"\n",
"Thanks to the [Microsoft Azure Kubernetes Service](https://docs.microsoft.com/en-us/azure/aks/) on which this Jupyter image is running."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -462,7 +460,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
"version": "3.5.4"
}
},
"nbformat": 4,
Expand Down
Loading