The following is part of a on-going collection of Jupyter notebooks. The goal being to have a library of notebooks as an introduction to Mathematics and technology. These were all created by Gavin Waters. If you use these notebooks, be nice and throw up a credit somewhere on your page.

Say Hello

The input of Jupyter Notebooks can be activated by pressing shift+Enter at the same time.

To get to a new line in a cell you just can press enter

Lets try a print function

You can assign the test a variable name, like Bob

This is stored in the memory of the Kernel that this notebook is running on. Hence anytime you call on Bob the kernel will produce the string "Hello World"

Notice that computers are precise, and they like it of you could try to be also.

Luckily, notebooks will give a small bit of feedback on why you seem to be nonchalant about your coding.

Numbers in python are not variable names.

We can "concatenate" strings in python easily.

The notebooks compute the cell based upon the knowledge the kernel has up to that point. If we were to restart the kernel, or shutdown this kernel and start anew, then all previous variables would be lost.

Now lets disect that World

We know that our Bob variable is just a string. How long is it? can we slice and dice it?

In notebooks the cell only outputs the last thing it is told to do. That is unless it is specifically told to output information.

Notice that the print function does not output the "" quotes. because we are not passing through the string as a variable

We can even figure out how long the string is.

For loop

Simple yet the bane of alot programers. Do not get lost in a for loop. Make sure there is an end, omake sure that you are not exponentially generating computations.

The format is simple,

for parameter in set :

    do some stuff that is indented

    Stuff ends when the indent ends.

Fancier loops are only limited by your imagination.