\n",
"\n",
"---\n",
"\n",
"Be sure to commit a small example output image from your code and link to it HERE (in the source), or link to an external image (logo, etc.) via URL. Remove this line after! Provide a brief `alt` text as well to benefit those with image display issues or potentially making use of screen readers.\n",
"
\n",
"\n",
"\n",
"# Objectives\n",
"\n",
"* Use this section to \"tag\" the key interactions with your notebook, restate in plain language your notebooks overall goal\n",
"* Supplement with brief description of the skills/tools that will be highlighted or smaller objectives that will be completed\n",
"* Generate numbers for function inputs with [NumPy](https://numpy.org/doc/stable/)\n",
"* Calculate $y = f(x) = sin(x)$ with [NumPy](https://numpy.org/doc/stable/) (don't forget math text!)\n",
"* Demonstrate visualizing this with [Matplotlib](https://matplotlib.org/)\n",
"\n",
"---"
]
},
{
"cell_type": "markdown",
"metadata": {
"toc": true
},
"source": [
"
"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Imports\n",
"We will begin by importing the important packages to be used throughout! Instructors, generally keep your imports to before your objectives unless there is an important takeaway from what you're importing or the way you're doing it. Give a brief description if necessary in more introductory notebooks."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Top\n",
"\n",
"---"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Your first objective\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Begin your learning narrative here with your first individual learning objective. Be sure to use markdown cells to guide your notebook, and explain your larger and more complicated objectives in plain language as necessary. Keep code comments to a minimum, but include them if they clearly help explain a quick decision or syntax quirk. Of course, if you find yourself needing more and more and more markdown as you go, you may need to trim down or split up your notebook!"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**NOTICE** copy this cell (after removing this text from source) to include at the end of any new sections you illustrate for a clear visual break and offer a path to the start of the notebook. You can use the markdown `---` separator to clearly separate your sections.\n",
"\n",
"Top\n",
"\n",
"---"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Objective number two\n",
"\n",
"Continue into your next objective, again defined by what unique piece of information you want your student to take away, or what pieces of code you want them to be able to take advantage of."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"x = np.linspace(0, 2*np.pi, 5)\n",
"x"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Highlight boxes can be useful!"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"y = np.sin(x)\n",
"y"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Don't forget, in markdown cells\n",
"#### you have access to\n",
"##### further subsection headings\n",
"\n",
"to help break up the organization of your sections as necessary. Don't let them get too long, however!"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"labels = [f'{val / np.pi} $\\pi$' for val in x]\n",
"\n",
"plt.plot(x, y)\n",
"plt.scatter(x, y)\n",
"plt.xticks(x, labels);"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Top\n",
"\n",
"---"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Objective, the third\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"x_10 = np.linspace(0, 2*np.pi, 10)\n",
"y_10 = np.sin(x_10)\n",
"\n",
"x_100 = np.linspace(0, 2*np.pi, 100)\n",
"y_100 = np.sin(x_100)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"plt.plot(x_10, y_10, label=\"x=10\")\n",
"plt.plot(x_100, y_100, label=\"x=100\")\n",
"plt.xticks(x, labels)\n",
"plt.legend();"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"and so on, and so forth! Don't forget to follow your narrative, and by the end feel free to sneak in some (not so scary!) previews or natural extensions to your notebook pointing the learner where they might go next. And of course, thank you!"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Top\n",
"\n",
"---"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## See Also\n",
"\n",
"Finally, reserve a small space at the end for any citations/references, links to external resources (e.g. other websites, courses, activities), or suggestions for potentially 2-3 of our other notebooks that may complement or make for a logical prequel/sequel to your notebook. We will have direction for this on the website as well, but keep this in mind here at the end!\n",
"\n",
"### Related Notebooks\n",
"\n",
"Other notebooks that have similar content or ideas\n",
"- [notebook 1](link)\n",
"- [notebook 2](link)\n",
"\n",
"### Additional Documention\n",
"\n",
"Add documention links and/or supporting scientific information"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Top\n",
"\n",
"---"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.5"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": true,
"sideBar": true,
"skip_h1_title": true,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": true,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": true
}
},
"nbformat": 4,
"nbformat_minor": 4
}