{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\"Unicode\n", "\n", "# Welcome!\n", "\n", "Welcome to the wonderful world of high school mathematics in conjunction with Python. \n", "\n", "We're going to be using the Python computer language to help understand some mathematics. \n", "\n", "My name is Kirby Urner and I'm the author of this text. So when you encounter me using the first person, you'll know of whom I speak.\n", "\n", "### The Focus\n", "\n", "Imagine a futuristic high school that used a programming language to abet one's understanding of all matters mathematical, from polyhedrons to public key crypto. \n", "\n", "This would be a curriculum customized for such a school.\n", "\n", "This demonstration repo does not purport to completely cover all the territory it introduces. Use this text as a guide with many jumping off points. \n", "\n", "Also use it as exemplary of what your own demos might look like down the road, should you choose to adopt this technology.\n", "\n", "More specifically, this curriculum emphasizes [Lambda over Delta Calculus](https://youtu.be/eTDH7m4vEiM), where the former is shorthand for discrete and/or digital mathematics. \n", "\n", "Delta Calculus is of course the current staple of any college prep diet.\n", "\n", "For a good example of strong curriculum writing focusing on Delta Calc with Python, check out [A. Jorge Garcia's Shadowfax blog](http://shadowfaxrant.blogspot.com/).\n", "\n", "### Pedagogy\n", "\n", "My first foray into using Jupyter technology with high school students was in 2020, with the onset of the pandemic. I was working for Coding with Kids, driving to local schools and doing MIT Scratch, Codesters, Replit, and some other cloud-based, Chromebook-friendly stuff. \n", "\n", "However I was using Jupyter extensively with adults (see Andragogy), and I had also done an online camp or two, so [Camp MightyMoose](https://github.com/4dsolutions/python_camp/blob/master/PyCampNextLevel.ipynb) was born.\n", "\n", "Jupyter Notebooks are still a relatively new technology. There's a way to embed questions and run the answers through nbgrader. I imagine a school server hosting a growing collection of such Notebooks, some designed to be gradable, others available to be run and modified.\n", "\n", "I'm currently looking at Replit's Teams for Education as another core tool that might be used right alongside these Jupyter Notebooks.\n", "\n", "### Andragogy\n", "\n", "Andragogy is \"pedagogy for adults\" meaning we don't teach people the same way regardless of age level and/or prior background.\n", "\n", "I've made a specialty of [\"Pythonic Andragogy\"](https://www.youtube.com/c/kirbyurner/search?query=pythonic%20andragogy) which is a pithy way of putting in a nutshell what I do in the \"curriculum design\" department.\n", "\n", "Don't be put off by the \"high school\" moniker / motif around here, as exclusionary. In my ideal civilization (in my \"utopia\"), adults get to revisit high school from time to time, meaning over a life span we need to get back to basics occassionally.\n", "\n", "In practice, many adults get to revisit high school vicariously, by helping kids with their homework. I'm not suggesting there's anything wrong with or obsolete about that model. On the other hand, older folks need to get new knowledge and cues from younger folk as well.\n", "\n", "### Math Objects\n", "\n", "In case you're not seeing how an object oriented general purpose computer language might be relevant to learning math, lets briefly consider the idea of \"math objects\".\n", "\n", "When you want to understand how a radio works, it helps to build a radio. Build the machinery you're studying. Apply this same \"maker\" idea to something more metaphysical (or psychological) and you have \"Making Math\" a term we used around the O'Reilly School of Technology, then home to *Make: Magazine*.\n", "\n", "Consider the Rational Number type, consisting of two integer type numbers, the numerator and the denominator, thereby expressing a \"ratio\" (hence \"rational\"). \n", "\n", "What must we do when adding or subtracting two fractions, or multiplying and dividing? How about taking the reciprocal or inverse? Raising to a power?\n", "\n", "In Python, we have operator overloading, meaning you, the coder, are free to spell out the meaning of ```+, -, /, *, **``` vis-a-vis your specific type of object. You get to build the Rational Number type, the Permutation type, the Mod type which does its operations relative to some modulus (see [nums.py](nums.py)). \n", "\n", "### The H Shape\n", "\n", "Think of Python and Mathematics as the two sides of a ladder, with rungs connecting them. In climbing this ladder, you use your math to learn Python, and your Python to learn math.\n", "\n", "### The Topics\n", "\n", "As previously mentioned, a way of circumscribing a set of topics is to set a boundary criterion, namely that of \"relevant to high schoolers\". \n", "\n", "One way of implementing that filter is by using past, existing models, as a guide, and certainly some of that is going on here. I've been a high school mathematics teacher in a prior decade (1980s).\n", "\n", "However, having grown up in a household subscribed to *The Futurist*, with a dad who was all about planning as a profession, I'm mostly about encountering new horizons.\n", "\n", "My treatment of [the Mandelbrot Set](Fractals_in_ASCII.ipynb) in the Argand Plane, of Cryptography, and finally of spatial geometry, with so-called [Quadrays atop XYZ](Quadrays.ipynb), will impress many of you as either intelligent foreshadowing, long overdue innovations, or quirky expressions of an overly idiosyncratic point of view.\n", "\n", "All quirkiness aside, I'm assuming we all agree that high school level mathematics includes complex numbers, some trigonometry, and at least some single variable calculus. I work to cover these bases, among others, except by \"cover\" I mean \"suggestively touch upon\" because ultimately my aim is to inspire additional and deeper treatments of the included topics.\n", "\n", "### The Computer Language \n", "\n", "Python was Made in The Netherlands (North and South Holland are but provinces) and enhanced by a global team. Guido van Rossum invented the language and guided its progress as BDFL. The language continues to evolve.\n", "\n", "BDFL means Benevolent Dictator for Life and was Guido's snarky title, in the same comic tradition as \"world domination\" being the unofficial goal of Linux + GNU. Not that this goal went unreached, in the form of self mastery.\n", "\n", "Guido named his language after Monty Python, the BBC comedy troupe that also became popular in America, despite the censorship and dumbing down for prime time US TV. \n", "\n", "However, there's no ignoring that a python is likewise a snake, important [in Greek mythology](https://www.greeklegendsandmyths.com/python.html).\n", "\n", "\"P1050191\"\n", "\n", "Python's evolution is governed by a sophisticated process of submitting Python Enhancement Proposals (PEPs), which are enumerated and considered, much like bills before a congress. Debate is mostly among those most invested, as developers of the core language.\n", "\n", "Python's story begins in the 1990s, with Guido a mathematics major fresh from Amsterdam, and joining Stichting Mathematisch Centrum, a Dutch think tank. \n", "\n", "The institute was already using [a REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) (pronounced \"rehpull\") inhouse, called ABC, and ABC along with C, ML, some other languages, fed Guido's quest for a new computer language for everybody, yet not especially for beginners (not another BASIC).\n", "\n", "REPL means Read Evaluate Print Loop, and describes the workflow of any interactive shell, where the user types, the computer reads and evaluates, prints a result, and waits for a next user command. Python, like APL, like xBase (dBase, FoxPro) with its \"dot prompt\", is interactive (conversational) right out of the box (upon bootup). You can use it like a calculator." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "What you are looking at now is a [Jupyter Notebook](https://jupyter.org/) file transformed, on the fly, by a rendering engine, into HTML, which in turn instructs your browser in how to [render](https://dictionary.cambridge.org/us/dictionary/english/render) the page in its final form." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'3.7.9 (default, Aug 31 2020, 07:22:35) \\n[Clang 10.0.0 ]'" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import sys\n", "sys.version" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Do you want to run multiple versions of Python on the same computer? There are ways... Python comes with a \"virtual environment system\" for example. The Standard Library includes [venv](https://docs.python.org/3/tutorial/venv.html). The Anaconda distribution of Python includes its own virtual environment solution." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's exercise a built-in, something Python comes with, built in, minus any need to use the keyword ```import```." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Copyright (c) 2001-2020 Python Software Foundation.\n", "All Rights Reserved.\n", "\n", "Copyright (c) 2000 BeOpen.com.\n", "All Rights Reserved.\n", "\n", "Copyright (c) 1995-2001 Corporation for National Research Initiatives.\n", "All Rights Reserved.\n", "\n", "Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.\n", "All Rights Reserved." ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "copyright" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Course Framework\n", "\n", "The main tools we'll be using:\n", "\n", "* [Python](https://python.org): general purpose computer language\n", "* an IDE (at least one): development environment\n", "* [Github / Git](https://github.com/4dsolutions/elite_school): version control and sharing\n", "* [JupyterLab](https://jupyter.org): includes Jupyter Notebooks + IDE \n", "* [Replit](https://replit.com/@kurner): Python in the cloud\n", "* [Google Colab](https://colab.research.google.com/) / [Saturn Cloud](https://saturncloud.io/docs/getting-started/start_in_ten/): Notebooks in the cloud\n", "\n", "Typically a student will have a fairly beefy localhost laptop able to run Python and Jupyter locally. I've been recommending [the Anaconda distribution](https://www.anaconda.com/products/individual) because it already contains, along with Python, 3rd party tools such as we use in this course, including JupyterLab and the Spyder IDE.\n", "\n", "\"python_course_workflow\"\n", "\n", "### Python\n", "\n", "\"PSF\n", "\n", "Python was not designed for beginners, but it turned out simple enough to introduce the Object Oriented Paradigm (OOP). Python has functional aspects too, meaning functions outside of classes make perfect sense, unlike in Java.\n", "\n", "\n", "### IDE\n", "\n", "\"Python\n", "\n", "An Interactive Development Environment is about making your life as a coder a lot easier. The interactive shell or REPL, text editor, debugger, linter, spellchecker, all come together in a pleasant dashboard. \n", "\n", "Don't feel like you always have to use the same IDE. \n", "\n", "Try a few of them. \n", "\n", "\"VScode\"\n", "\n", "Some IDEs are language specific, such as Spyder and IDLE, whereas others give you optional plug-ins or add-ons (extensions) for working with multiple languages (vscode is of this type, as are Emacs and Eclipse). \n", "\n", "One of the minimal IDEs is Vim, based on Vi. Vi grew up in the UNIX environment which also features what are called Regular Expressions, used for pattern matching, as when searching text. Many UNIX commands feature them, such as grep. \n", "\n", "Python has a decently endowed regular expressions library (named ```re```) but does not make \"regexes\" (for short) as central to the language as Perl did. Perl was already well established when Python was born. O'Reilly's Open Source Conference (OSCON) was still the Perl Conference. These happen in Portland (usually)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Github / Git\n", "\n", "\"Complex\n", "\n", "\"github_logo\"\n", "\n", "Here's where [Youtube](https://youtu.be/BCQHnlnPusY) or another source of videos might come in handy, to explain the world of Version Control, both in broad brush strokes and up close.\n", "\n", "Git arose from the [GNU Linux Project](https://www.gnu.org/gnu/linux-and-gnu.en.html). Linus Torvalds needed a way to keep the foundations under Linux, its version control system, collaboratively used from around the world, free and clear of future \"right to use\" obstructions. \n", "In other words, the version control system used for Linux was too important a dependency to leave to others.\n", "\n", "Picture many people working on a project and wanting to take it in various directions, provisionally. You have a main trunk with experimental branches, with the opportunity to merge successful threads back into the main action. That's one pattern for using Git.\n", "\n", "The main point of version control is you're able to roll back through time and use snapshots of how the project looked in the past. Drafts get saved. Changes stay undoable, at least in theory." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### Heads Up\n", "\n", "As of this writing, Github is [changing the workflow](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) such that a specific session token, rather than a user password, is needed to post changes. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### JupyterLab\n", "\n", "\"jupyter_window\"\n", "\n", "The Jupyter Project arose from the I-Python Notebook Project, which in turn arose from the [IPython Project](http://micropython.org/).\n", "\n", "JupyterLab is a browser-based IDE for Jupyter Notebooks, one of which you're looking at here (unless you're reading a PDF derived from it). The main text for our courses is likely in this format (ipynb), in our futuristic high school. Teachers and students alike author courseware and related projects using JupyterLab.\n", "\n", "Jupyter Notebooks implement what Donald Knuth, a father of computer science, dubbed \"literate programming\". \n", "\n", "Instead of just source code, with comments and docstrings sprinkled in, you have the ability to mix \"code cells\" with \"markdown cells\". The former include runnable source code, which produce output, whereas the latter communicate directly to humans via words, images, and links. \n", "\n", "What you are reading right now is a markdown cell. The first code cell on this page was nearer the top, where we queried Python for a version number." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Major Topics:\n", "\n", "* Object Oriented Programming or [OOP](ObjectOrientedProgramming.ipynb)\n", "* [Coding Through Storytelling](Storytelling.ipynb)\n", "* [DB API](DatabaseFun.ipynb) (talking to databases)\n", "* [numpy and pandas](TabularPython.ipynb)\n", "* [Algorithms in Cryptography](Crypto.ipynb)\n", "* [sympy](CAS_Python.ipynb), a computer algebra system (CAS)\n", "* [Tractors in a Field](Tractors.ipynb) (Python generators)\n", "* [Random Walks in the Matrix](Quadrays.ipynb) (Quadray Coordinates)\n", "\n", "### Sub Topics: \n", "\n", "* A Data Structure: the Binary Tree\n", "* [named tuples](Bridge2OOP.ipynb)\n", "* mutability versus immutability\n", "* [callability](Internals.ipynb)\n", "* sorting sequences\n", "* \"randomness\"\n", "* slicing and dicing sequences\n", "* Unicode\n", "* [date and time related topics](Calendar.ipynb)\n", "* [ACSL exercises](Exercises.ipynb)\n", "\n", "### Study Sheets\n", "\n", "* [Lambda Notation](LambdaExpressions.ipynb) with map, reduce, filter\n", "* [Sigma Notation](SigmaNotation.ipynb)\n", "* [Pascal's Triangle](PascalsTriangle.ipynb) and the Python generator\n", "* [Converging to Phi by Continued Fraction](GenPhi.py)\n", "* [Generating the Digits of Pi](GenPi.ipynb)\n", "* [Logarithms](Logs.ipynb)\n", "* [Delta Calculus](Calc_with_Python.ipynb)\n", "* [Trigonometry](Trig.ipynb)\n", "* [Complex Numbers](Complex.ipynb)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Immutability versus Mutability\n", "\n", "The tuple of tuples below is read only." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "zoo = ((\"Ape\", 4), (\"Zebra\", 2), (\"Penguin\", 1))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The tuple of lists below looks like it might be immutable but is it?" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "L = ([] , [])" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "([], [])" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "L # is L immutable?" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "([], ['dog'])" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "L[1].append(\"dog\")\n", "L # no!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Callability\n", "\n", "This topic is worth a [whole page to itself](Internals.ipynb)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Sorting Sequences" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "How might you sort zoo tuples by either animal or age? \n", "\n", "Here's a way I would not expect a beginner to find right away:" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "from operator import itemgetter" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[('Penguin', 1), ('Zebra', 2), ('Ape', 4)]" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sorted(zoo, key=itemgetter(1))" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[('Ape', 4), ('Penguin', 1), ('Zebra', 2)]" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sorted(zoo, key=itemgetter(0))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Randomness" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "from random import choice, shuffle" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(('Ape', 4), ('Zebra', 2), ('Penguin', 1))" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "zoo" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "```shuffle``` mutates its argument, and since ```zoo``` is immutable, it's not a legal argument to ```shuffle```. However, we may replace the outer tuple with a mutable list and then apply randomness." ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[('Zebra', 2), ('Ape', 4), ('Penguin', 1)]" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "shake_up = list(zoo)\n", "shuffle(shake_up)\n", "shake_up" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[('Ape', 4), ('Zebra', 2), ('Penguin', 1)]" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "shuffle(shake_up)\n", "shake_up" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "('Ape', 4)" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "choice(shake_up) # pick an element at random" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'7eovprsbdrxod9lfmrls876c2'" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "def get_token(n=25):\n", " chars = \"abcdefghijklmnopqrstuvwxyz1234567890\"\n", " return \"\".join([choice(chars) for _ in range(n)])\n", "\n", "get_token()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Slicing and Dicing Sequences\n", "\n", "Sequences (like lists, tuples, ranges) have left-to-right (right-to-left) order, are sortable and reversible. \n", "\n", "Mappings (dicts, sets), in contrast, are more general, in that the same content, in arbitrary order, connotes equality." ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "True" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "{\"a\":\"b\", \"c\":\"d\"} == {\"c\":\"d\", \"a\":\"b\"}" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "False" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "[\"a\", \"b\", \"c\", \"d\"] == [\"c\", \"b\", \"a\", \"d\"]" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "True" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "set([\"a\", \"b\", \"c\", \"d\"]) == set([\"c\", \"b\", \"a\", \"d\"])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Recent Pythons implement [PEP 448](https://www.python.org/dev/peps/pep-0448/), expanding the powers of the single- and double-star when used as prefixing unary packing / unpacking operators." ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(('Ape', 4),\n", " ('Zebra', 2),\n", " ('Penguin', 1),\n", " ('Ape', 4),\n", " ('Zebra', 2),\n", " ('Penguin', 1))" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "(*zoo, *zoo)" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(('Ape', 4), ('Penguin', 1), ('Zebra', 2))" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a_slice = slice(0,None,2)\n", "(*zoo, *zoo)[a_slice]" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'Ape': 4, 'Penguin': 1, 'Zebra': 2}" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "to_ship_tupl = (*zoo, *zoo)[a_slice]\n", "to_ship_dict = dict(to_ship_tupl)\n", "to_ship_dict " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "When a dict cries out to be converted into named arguments, to any callable, the double-star unary operator, prefixed, comes to our aid.\n", "\n", "Likewise, as we learn when studying [callability](Internals.ipynb), the double-star operator, in front of a parameter name, will match any remaining named arguments to a dict, by that name. " ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'Llama': 2, 'Ape': 4, 'Penguin': 1, 'Zebra': 2}" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dict(**{\"Llama\":2}, **to_ship_dict)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Unicode" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "As we discussed in our first meetup, Unicode is the successor to ASCII both in the sense of superceding, and in the sense of swallowing and including.\n", "\n", "Python libraries will let programmers continue working in pure ASCII, or in any of several codecs whereby plain text is decoded and encoded.\n", "\n", "UTF-8 is the most common flavor of Unicode and is Python's default. The format commits varying numbers of bytes to the Unicode codepoints, with information up front (front byte) regarding how many bytes follow (picture a tiny train of one to four cars, car = byte)." ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [], "source": [ "import fooding" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['🍗', '🍩', '🎂', '🍟', '🍞']" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "fooding.foods" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['🍇', '🍈', '🍉', '🍊', '🍋', '🍌', '🍍', '🍎', '🍏', '🍐', '🍑', '🍒']" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "fooding.fruits" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "[Fooding?](https://d65im9osfb1r5.cloudfront.net/thesaurus.net/fooding-and-lodging.png)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "*Explorations with Unicode*:\n", "\n", "The script below is designed to run at the command line, and therefore has to read arguments from the command line.\n", "\n", "[unicode_fun.py](https://github.com/4dsolutions/python_camp/blob/master/unicode_fun.py)\n", "\n", "*Proposed project*:\n", "\n", "Add another language section to the ```unicode_fun.py``` menu and to the output." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Additional Resources:\n", "\n", "[Proposed Exercises](Exercises.ipynb)\n", "\n", "[Youtube Gallery](YoutubeGallery.ipynb) (curated)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Curriculum Using Python + Jupyter Notebooks\n", "\n", "[GeoPython](https://geo-python-site.readthedocs.io/en/latest/) by the Department of Geosciences and Geography at the University of Helsinki\n", "\n", "[Python Data Science Handbook](https://jakevdp.github.io/PythonDataScienceHandbook/) by Jake VanderPlas\n", "\n", "[School of Tomorrow](https://nbviewer.jupyter.org/github/4dsolutions/School_of_Tomorrow/blob/master/School_of_Tomorrow.ipynb) by Kirby Urner" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## For Further Reading\n", "\n", "[History of Python](https://en.citizendium.org/wiki/Python_(programming_language%29) (my Wiki article)\n", "\n", "[Python for High School](PY4HS.ipynb) (summer 2022)\n", "\n", "[Generating the FCC](https://nbviewer.jupyter.org/github/4dsolutions/Python5/blob/master/Generating%20the%20FCC.ipynb) computer graphics stuff\n", "\n", "[Intro to Python Flickr Album](https://flic.kr/s/aHsknZHG75) used in courses\n", "\n", "[Answering Questions on Quora](https://www.quora.com/profile/Kirby-Urner) (doing my civic duty)\n", "\n", "[PyCamp: Another Repo for Teens](https://nbviewer.jupyter.org/github/4dsolutions/python_camp/blob/master/PyCampNextLevel.ipynb) by me\n", "\n", "[Python Release Schedule](https://www.python.org/dev/peps/pep-0602/) (3.9, 3.10, 3.11...)\n", "\n", "[In the Beginning Was the Command Line](https://www.nealstephenson.com/in-the-beginning-was-the-command-line.html) by Neal Stephenson, a classic\n", "\n", "[Revolution OS](https://youtu.be/Eluzi70O-P4) movie documentary\n", "\n", "[A Monty Python Story](https://www.newyorker.com/magazine/1976/03/29/naughty-bits) in the *New Yorker* (1976)\n", "\n", "[Course Alumni](Alumni.ipynb) (optional, self identified)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.11.3" } }, "nbformat": 4, "nbformat_minor": 4 }