Skip to content

Using native markdown tag for images on notebook.md #8

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

Merged
merged 1 commit into from
Apr 12, 2014
Merged
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
22 changes: 12 additions & 10 deletions core/notebook.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ However, there are other ways to work with Python. [IPython](http://ipython.org/

## Sneak Preview of IPython

<img src="../images/ipython_example.png" alt="A sample from the IPython Notebook introduction examples">
</img>
![A sample from the IPython Notebook introduction examples][ipn-example]

(This is just an example of what IPython Notebook can do, don't feel like you need to understand it just yet! If you want to type it into IPython Notebook later on, type the special command `%matplotlib inline` before you start - there's an explanation coming up in the Charts chapter.)

Expand Down Expand Up @@ -86,27 +85,23 @@ Even though you're interacting with IPython Notebook using your browser, Noteboo

In your browser, click the "New Notebook" button and a new notebook will open up.

<img src="../images/ipython_notebook.png" alt="IPython Notebook empty">
</img>
![IPython Notebook empty][ipn-empty]

The empty box at the top is the first "cell" for entering Python code.

Try typing something like `print("Hello World")` into the cell. To run the code in the cell and see the output, click the Run button (play icon) on the toolbar, or type Shift-Enter:

<img src="../images/notebook_hello_world.png" alt="IPython Notebook Hello World">
</img>
![IPython Notebook Hello World][ipn-hello]

You'll see that whenever you run a cell, a new empty cell appears where you can enter another set of Python statements. Try assigning a variable. Let's make another shopping list:

<img src="../images/assign_shopping_list.png" alt="IPython Notebook Assign Variable">
</img>
![IPython Notebook Assign Variable][ipn-variable]

When you Run this cell you won't see any output, but behind the scenes the variable "shopping list" has been assigned.

We can see this by making a third cell to print the contents:

<img src="../images/print_shopping_list.png" alt="IPython Notebook Print Shopping List">
</img>
![IPython Notebook Print Shopping List][ipn-list]

You can do anything with IPython Notebook cells that you'd do with normal Python code. As you build up the notebook full of cells you create a history of the things you've done and the results that were printed.

Expand Down Expand Up @@ -175,3 +170,10 @@ Tried out IPython Notebook but don't really like it? No problem! The rest of the
## Next Chapter

Time to give Notebook a real workout! The next chapter is [Working With Text Files](text-files.html)

[ipn-example]: ../images/ipython_example.png
[ipn-empty]: ../images/ipython_notebook.png
[ipn-hello]: ../images/notebook_hello_world.png
[ipn-variable]: ../images/assign_shopping_list.png
[ipn-list]: ../images/print_shopping_list.png