<jupyter_start><jupyter_text>![Callysto.ca Banner](https://github.com/callysto/curriculum-notebooks/blob/master/callysto-notebook-banner-top.jpg?raw=true)  Jupyter Test Drive - Typesetting with MarkdownThis notebook demonstrates the use of Markdown to type set documents in Jupyter. After working through this notebook, you will be able to edit the text in any notebook.  In addition, you will be able to assist your students in editing the text of their own notebooks.  The _very_ BasicsNote that you can view the source code behind any cell by double clicking it. To re-render or re-run the cell, use any of these options:1. Select `Cell` $\rightarrow$ `Run Cells`2. Hit `Shift-Enter` 3. Click the `Run` button above  Creating and Deleting Markdown CellsThe first step you may want to do is to create a new cell for typesetting. To do that, while you have this cell selected, from the top menu click the plus (+) sign next to the save button. Once you have created the new cell, you will get a blank `Code` cell above. To change that cell into one that you can use for typesetting, select the cell, and from the dropdown menu at the top, change `Code` $\rightarrow$ `Markdown`. This changes that cell type into a markdown cell, and it can now be used for typesetting!The next step will be learning how to delete cells. Select the cell above that you converted to a markdown cell. To remove this cell from your Jupyter notebook  click `Edit` $\rightarrow$ `Delete Cells`. If you accidentally deleted an incorrect cell, you can always bring it back by clicking `Edit` $\rightarrow$ `Undo Delete Cells`.  Creating TitlesCreating large bold title text in a Jupyter notebook with markdown is very simple! All you need to do is on a new line, type the pound sign and then a space. After the space, add your title. It's that simple. By adding extra pound signs, you will create different title levels. The cell below is unformatted markdown text demonstrating this.  I am a level one title I am a level two title I am a level three title I am a level four title I am a level five title I am a level six title  I would be a level seven title if such a thing existedIf   isn't the first character, that line does not get rendered as a title.  To see how those titles look when they're rendered in the Jupyter notebook, select the cell above, and from the top menu select `Raw NBConvert` $\rightarrow$ `Markdown` (to change the cell from a raw type to a Markdown type), then press `Ctrl + Enter` to render the cell. Feel free to create a new cell and play with those, or change  the one above.   Creating Itemized ListsCreating lists in markdown in a Jupyter notebook is also straight forward! To do so you simply need to start a new line and begin counting. The markdown syntax is shown in the code below.<jupyter_code>#### Double Click Me (RawNBConvert)

1. This is the first item of a list
1. This is the second
50. Notice how the numbers we use don't matter once it's rendered
    1. By pressing the `Tab` key we can add sub items
    45. The numbers don't matter here either
        - We can add many sub-lists
            - But at some point it starts to get redundant
        - We can also go back a few levels of nesting by lining the text up with the line above
2346. By going back to the original line, we leave our nested lists
23236235672456. The numbers really don't matter.
* In fact, you can give up on numbers at any time.
1. Or start counting again
    

- We also don't need to have numbers if we don't want to!
    * We have plenty of options
-Notice how if we don't put a space between the dash and the first term it doesn't become a new item in the list!<jupyter_output><empty_output><jupyter_text>Double Click Me (Markdown Rendered)1. This is the first item of a list1. This is the second50. Notice how the numbers we use don't matter once it's rendered    1. By pressing the `Tab` key we can add sub items    45. The numbers don't matter here either        - We can add many sub-lists            - But at some point it starts to get redundant        - We can also go back a few levels of nesting by lining the text up with the line above2346. By going back to the original line, we leave our nested lists23236235672456. The numbers really don't matter.* In fact, you can give up on numbers at any time.1. Or start counting again    - We also don't need to have numbers if we don't want to!    * We have plenty of options- Notice how if we don't put a space between the dash and the first term it doesn't become a new item in the list! --- Exercise 11. In the cell above, try fixing the last line so that the last item in the list becomes properly formatted once it's rendered. 2. Create a new cell below, add a title, and an ordered list of your five favourite fruits.---  Fave Fruits1. Tomatoes (they're a fruit right?)1. Strawberries1. Dragon fruit (they come from cactus!)1. Lychees (yummy)1. Durian (jk)  LinksYou can add hyper links to webpages anywhere you'd like right in the text. The syntax is as follows```markdown[text you want to display](link to a file or url page)```Change the cell below to markdown, run it, and see where the link takes you! [this is the text that becomes the hyperlink](https://media.giphy.com/media/Vs44a88Dvbnkk/giphy.gif)  Images/gifsImages and gifs can be emebedded in a markdown cell nearly identically to placing a hyperlink. To display the image, add an exclamation point to the command as demonstrated below. ```markdown![type anything here, it really doesn't matter, it's more for your reference](link in parenthesis)```would display an image/gif. It can either be a url link to an image, or one you have saved on the hub/locally. Change the cell below to markdown and run it to see it in action, or even embed your own images in this notebook.  ![type type type](https://media.giphy.com/media/gVoBC0SuaHStq/giphy.gif) --- Exercise 21. In a new cell below, embed an image of a cat. 2. In the same cell, add a hyperlink below the image that links to the original image.3. Change the text displayed in the hyperlink to say "Kitty Kitty".--- ![grumpy cat](https://ichef.bbci.co.uk/news/660/cpsprodpb/71E1/production/_99735192_gettyimages-459467912.jpg)[Kitty Kitty](https://ichef.bbci.co.uk/news/660/cpsprodpb/71E1/production/_99735192_gettyimages-459467912.jpg)  Block QuotesBlock quotes are a way to indent text/images with a grey bar in order to distinguish them from the main text. It is quite simlly done by adding a `>` at the beginning of a line. Change the cell below to markdown to see some examples > This is an example of a block quote. You can type as long as you like and all the resulting text will be to the right of a the vertical grey bar. You can also use block quotes to easily format images with captions! > ![this image will be in block quotes](https://media.giphy.com/media/fs6rnt1K0YyVWRXNwY/giphy.gif)>> Now we can include a caption for images. This is nice because the image is now distinguishable from the main text. This makes it easy to include images without interrupting any narrative you've created. Notice how I have included a blank `>` under the image. That is so the spacing of this text looks nice underneath. Try removing it and see what happens  TablesOne can also create tables of data in Markdown. However, doing this manually is often not the most convenient. For large tables we recommend using online tools (such as [here](https://jakebathman.github.io/Markdown-Table-Generator/)) where you can copy-paste excel tables or csv files. This will then output syntax to properly render those tables. For smaller tables, it's quite easy to type out your own. See the cell below.<jupyter_code>| This is the first column name| Second Column| Third|
|---|---|-------------|
|Notice how nothing is lined up when we type it | But that it looks nice when rendered| how convenient!|
|shorter lines are good too| numbers?| 343453|
|symbols| `yes`| $\int e^{-x^2} dx$ |
|also notice that the number of dashes in the second line don't matter | it just needs to be at least three| the rest are really only for you to make pre-rendering look nice |<jupyter_output><empty_output><jupyter_text>| This is the first column name| Second Column| Third||---|---|-------------||Notice how nothing is lined up when we type it | But that it looks nice when rendered| how convenient!||shorter lines are good too| numbers?| 343453||symbols| `yes`| $\int e^{-x^2} dx$ ||also notice that the number of dashes in the second line don't matter | it just needs to be at least three| the rest are really only for you to make pre-rendering look nice | The basic table syntax is as follows:```markdown|initialize| your| column| names||----------|-----|-------|------| <- this line sets up the headers, need at least three `---` each line|     data | data| data  | data | <- any kind of text data can be put in a table. Feel free to mix too!| numbers  | text| text  | data   <- you don't need to include the right-most pipe if you don't want to```The syntax can be thought of as how you would try to write a table directly using symbols on your keyboard. Play with the table in the cell above, or create a new cell and try making your own! You could put one in this cell as well and put a table here. Double click anywhere on this cell to open edit mode. --- Exercise 31. When using notebooks that have been created by someone else, teachers may like or dislike various sections of the content. Luckily, it's easy to make these minor changes in notebooks. In the two cells below:     * remove the second cell because you won't need it in your lesson    * remove the last paragraph in the first cell     * change the date in the first paragraph2. In the first cell below, take the ordered list out of the block quote. ---<jupyter_code>> ## Properties of Random Numbers (Raw NB Convert - Before)
> 
> May 22, 2018  
> Suppose you have a sequence of $N$ random numbers $\{R\}$ with contents $\{r_1, r_2, ... , r_N\}$ where each element $r_i$ is a random number. What sort of properties should this sequence of numbers have? If this is truly a sequence of random numbers, it _must_ satisfy the following properties, which we will explain in greater detail: 
> 
> 1. Drawing any $r_i$ is equally probable and independent. 
> 2. The sequence of random numbers is uniformly distributed. 
> 
> "Drawing a value" in this scope means we're picking a number from our sequence of random numbers, but not removing it from the sequence (the sequence remains unchanged, we're simply "observing" the random number). 
Let's look at these two properties in a little more detail. 
> ## Properties of Random Numbers (Raw NB Convert - After)
> 
> March 31, 2019  
> Suppose you have a sequence of $N$ random numbers $\{R\}$ with contents $\{r_1, r_2, ... , r_N\}$ where each element $r_i$ is a random number. What sort of properties should this sequence of numbers have? If this is truly a sequence of random numbers, it _must_ satisfy the following properties, which we will explain in greater detail: 

1. Drawing any $r_i$ is equally probable and independent. 
2. The sequence of random numbers is uniformly distributed.<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.06702412868632708, 'fraction_numerical': 0.014119749776586237, 'mean_word_length': 3.823706896551724, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 32, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '49199', 'license': 'CC-BY-4.0', 'n_tokens_mistral': 3090, 'n_tokens_neox': 2894, 'n_words': 1807, 'path': 'CallystoAndComputationalThinking/MarkDown-Solution.ipynb', 'repo_name': 'lfunderburk/online-courses', 'size': '11190'}