Module 1 Section 1- Starting Jupiter Notebooks
Photo by Chris Ried on Unsplash
Dated: May 31, 2018
Unit 1 Section 1 – Completion and examination 100%
Introduction to Python
Unit 1 Section 1.1 – Hello World
print (“Hello World!”)
Print always lower case with text inside the quotations
enclosed with open and close parentheses and output is ran Python 3¹:
1.
Menu or Tab Cell
o
Select run cell
2.
Ctrl + Enter (to run cell code)
3. Shift + Enter (to run cell code and insert new cell code below previous cell
Unit 1 Section 1.2 - Comments
# hashtag or pound symbol is use a denote comments
For example: # This is “Hello World” for Python 3 (in code cell)
[ ] bracket symbol is use for student (us) to signify we have some task to complete.
# [ ] -
There are a few ways to run code cell in Python 3¹.
And all new cell always defaults to “code” dropdown menu.
Unit 1 Section 1.3- Notebooks and Libraries
Self-explanatory notes not needed.
Unit 1 Section 1.4 - Altering Jupyter’s Python Notebook Structure
Change Programming Language in Azure Notebook
We always want our Jupyter notebook in Python 3 state due from:
·
Sometimes Jupyter’s Python, new notebook could
be automatically save in a differ verse Python states:
1.
Kernel
2.
Python 2
3.
Python 3.6
4. Etc.
To change Jupyter’s Python programming language:
Goto
the Kernel menu (tab)
Select
= Change Kernel
Then
Select = Python 3
Another common issue with Jupyter’s Python notebook is:
·
you might write some codes and Jupyter’s Python
puts the notebook into an unstable state:
1.
either the browser will become frozen, or
2. the code runs too long and will not finish.
When this happen, reset the Kernel:
Goto
the Kernel menu or tab
Select
= Restart
OR
Select
= Restart & Clear Output
(will
put all of the previously ran codes set to a starting point, so that, there are
variables
in memory).
How to insert new cells?
To insert new cells:
1.
press Shift + Enter on my keyboard
(if the curse is in the last cell, Python will add a new cell below the
previous cell or if you are in the middle of a cell then press Shift + Enter,
Python will run the cell and moves to the next cell.)
2.
Goto the Insert Menu or Tab
Select = Insert cell Above, or
Select = Insert Cell Below.
Comments