Python in K-12: good news (they're using Jupyter)

Here's something for the archive about how Python continues to help me in my work as a K-16 curriculum developer. There's a link to a Jupyter Notebook running sympy towards the middle, with the surrounding text about how it looks to me like the schools are moving to Jupyter, judging from my own experience with regional faculties. Kirby Urner Oregon Curriculum Network ---------- Forwarded message --------- From: kirby urner <kirby.urner@gmail.com> Date: Thursday, January 25, 2024 at 7:39:09 AM UTC-8 Subject: Synergetics in K-12 To: trimtab-book-club@googlegroups.com <trimtab-book-club@googlegroups.com> The post below goes back to our TrimTab meetup with Siobhan Roberts and her bio of H.S.M. Coxeter. https://www.freelists.org/post/math4wisdom/Caring-for-our-legacies-Franz-Jer.... ( public archive) That USA public schools have proved themselves largely incapable of incorporating useful K-12 content drawing from Synergetics has left them non-competitive vs-a-vs private schools that are finding ways. This deficiency could be addressed, however the quality of public school education has dropped much lower on the priorities list than it used to be, according to a public school worker I interviewed recently (I'm still looking for a key data visualization on that score). Kirby ---------- Forwarded message --------- From: *kirby urner* <kirby...@gmail.com> Date: Wed, Jan 24, 2024 at 7:43 PM Subject: Re: [math4wisdom] Re: Caring for our legacies: Franz, Jere, Kirby, Andrius... To: <math4...@gmail.com> Cc: math4wisdom <math4...@freelists.org> Greetings all -- I am glad to be hearing from Franz, who has a lively writing style about stuff I also care about. My last contribution to this listserv was before my car trip north, somewhat recapitulating a trip I did with Andrius in 2023. On my way back, I visited a small private school my friend works at and spoke with the math faculty. [0] I was gratified to discover they were already using the Jupyter technology I favor, along with other stuff. Enough time has passed such that students exposed to Jupyter in college are now career teachers and are passing the torch if / when free to do so. "Jupyter" (the word) is an amalgam of Julia Python R (Ju-Pyt-R) as these were the original kernel languages adopting what used to be called I-Python Notebook technology. The idea is to create interactive web pages that not only present static content, but that also allow browsers to run code in one or more languages. As a high school (and above) level math and computer science teacher, I appreciate the level of integration this technology provides and I showcase it extensively. To take a concrete example: I've continued making hay from the piece of trivium that 2024 (our year) is a tetrahedral number. The next one won't be until 2300. A tetrahedral number is formed by stacking triangular numbers, picture bowling balls or cannon balls. 1, 4, 10, 20... we're accumulating triangular layers, making the stack higher and higher. Start with 1, put 3 under it, but 6 under that, then a layer of 10... and so on. https://oeis.org/A000292 After a long drive from north of Seattle back to Portland today, I wanted to relax and unwind by figuring out why we get (n(n + 1)(n + 2))/6 for this sequence, where n is the layer number. Given 22 layers: 22(23)(24)/6 = 2024. Check. What we can do is assume some formula A n^3 + B n^2 + C^n + D (n = 1, 2, 3, 4...) does the trick and substitute known values for n paired with corresponding right answers. Our goal is to derive the unknowns A, B, C, D from the knowns. A + B + C + D = 1 when n = 1 8A + 4B = 2C + D = 4 when n = 2 27A + 9B + 3D + D = 10 when n = 3 64A + 16B + 4C + D = 20 when n = 4 That's four linear equations in four unknowns, in principle solvable using algorithms from linear algebra. I added a middle section on the formula's derivation to: https://nbviewer.org/github/4dsolutions/m4w/blob/main/Sequences.ipynb letting Python in a Jupyter Notebook do the "heavy lifting" i.e. the work of inverting the matrix defined above. Why am I sharing all this here? I want to keep building on figurate and polyhedral numbers as a topic, and as a gateway to higher maths. Triangular numbers are figurate (flat) whereas polyhedral numbers tend to be multi-layer, such as cubes, tetrahedrons, octahedrons. One of our more important polyhedral sequences 12, 42, 92, 162... is the number of balls in successive layers when you start with 12-around-1 in an omni symmetric pattern, that of the cuboctahedron. [1] In adding layers, the shape does not change. In her biography of the late H.S.M. Coxeter, a pioneer of higher dimensional Euclidean geometry based in the University of Toronto, Siobhan Roberts talks about the generating formula for said sequence 10 * n^2 + 2, and how Coxeter was appreciative of Buckminster Fuller for having derived it on his own, even though it doesn't take more than high school level skills to do so. [2] Fuller had a fascination for ball packing as a topic. From one of my online essays [3]: In a virus, the RNA-protecting shell or capsid is made from sub-units called capsomeres. By taking F as the number of between-capsomere intervals, and using 10F2+2 on capsid "shell frequencies" of 1,2,3,4,5 and 6, we obtain corresponding counts of 12, 42*, *92, 162, 252 and 812 capsomeres. "All of these numbers are in fact found in actual viruses, 12 for certain bacteriophages, 42 for wart viruses, 92 for reovirus, 162 for herpesvirus, 252 for adenovirus and 812 for a virus attacking crane-flies (Tipula or daddy-long-legs)" - *The Natural History of Viruses *by C.H. Andrews (W.W. Norton R Co., 1967). That Fuller's formula was good at predicting micro-architectural aspects of viruses was even a newspaper headline in the Herald Tribune. [4] In sum, we're into networking topics: figurate and polyhedral numbers, deriving their formulae, finding some of these patterns in nature, such as in the architecture of the virus. Kirby [0] https://worldgame.blogspot.com/2024/01/tetrahedron-year.html [1] https://www.amazon.com/King-Infinite-Space-Coxeter-Geometry/dp/0802714994 [2] she doesn't mention that it was this formula in particular, but other sources, including OEIS itself, make it clear that Fuller does indeed get a lot of credit for it. https://oeis.org/A005901 My website features in the Links section: K. Urner, Microarchitecture of the Virus <http://www.grunch.net/synergetics/virus.html> [3] http://www.4dsolutions.net/synergetica/synergetica2.html#top [4] https://www.google.com/books/edition/Critical_Path/mkvoDQAAQBAJ?hl=en&gbpv=1&dq=buckminster%20%22herald%20tribune%22%20virus%20cold%20spring&pg=PA813&printsec=frontcover

Hello Kirby Jupyter is excellent, but I still wish there was a simple built-in charting tool in Python. Jupyter is like Sketchup, a tool I use once a year, but not enough to justify keeping up on it. My work now is focused on nuclear power <https://citizendium.org/wiki/Nuclear_power_reconsidered>, and educating journalists who might break with the mainstream and need a good summary of facts and arguments. That occasionally requires me to make a quick calculation and plot, and I find myself using Google Sheets instead of Python. Here is an example on Separative Work Units, the fundamental measure of cost in uranium enrichment. Once you get the calculation worked out, the plot is just a few more clicks. https://docs.google.com/spreadsheets/d/1OyKPyjo6k1ckZVwAh8sfkDEtB5W22VUriBae... David MacQuigg, PhD Engineering Editor, Citizendium 520-721-4583 On Thu, Jan 25, 2024 at 11:34 AM kirby urner <kirby.urner@gmail.com> wrote:
Here's something for the archive about how Python continues to help me in my work as a K-16 curriculum developer.
There's a link to a Jupyter Notebook running sympy towards the middle, with the surrounding text about how it looks to me like the schools are moving to Jupyter, judging from my own experience with regional faculties.
Kirby Urner Oregon Curriculum Network

Thanks for jumping in David. I concur, the Excel environment is a productive "home base" for deriving the visualizations and is in many cases is sufficient. In the Office model, one is then expected to embed said visualizations in a Word document, perhaps exporting to PDF, if wanting to add more verbiage and/or make it more journal article or textbook like. [1] In your type of advocacy work, maybe getting the visualizations is sufficient, and indeed, the final step from Jupyter Notebook to a PDF version is sometimes the trickiest, when it comes to page breaks especially. Here's a Notebook in the same ballpark, dealing with the half life of naturally occurring and/or artificially generated radioactive substances: https://nbviewer.org/github/4dsolutions/School_of_Tomorrow/blob/master/isoto... This is the classic synergy of Jupyter + pandas + matplotlib, the kind of thing I've been teaching through a Turkey-based company. [2] I don't see it as either / or, and true, Jupyter might be the wrong tool in many instances. I wonder if you've had a chance to play with pandas inside of Excel. I know Microsoft has added that. I've yet to try it out (currently, I don't have a computer with Office at my fingertips). Kirby PS: in my previous post I had a typo buried in the most mathy part, which I've since fixed on Github. https://groups.io/g/synergeo/message/2481 [1] https://www.theatlantic.com/science/archive/2018/04/the-scientific-paper-is-... (Atlantic has implemented more of a firewall then previously -- the article is about Wolfram's Mathematica as well as Jupyter) [2] https://nbviewer.org/github/4dsolutions/clarusway_data_analysis/blob/main/DA... On Thu, Jan 25, 2024 at 1:18 PM David MacQuigg <macquigg@gmail.com> wrote:
Hello Kirby
Jupyter is excellent, but I still wish there was a simple built-in charting tool in Python. Jupyter is like Sketchup, a tool I use once a year, but not enough to justify keeping up on it.
My work now is focused on nuclear power <https://citizendium.org/wiki/Nuclear_power_reconsidered>, and educating journalists who might break with the mainstream and need a good summary of facts and arguments. That occasionally requires me to make a quick calculation and plot, and I find myself using Google Sheets instead of Python. Here is an example on Separative Work Units, the fundamental measure of cost in uranium enrichment. Once you get the calculation worked out, the plot is just a few more clicks.
https://docs.google.com/spreadsheets/d/1OyKPyjo6k1ckZVwAh8sfkDEtB5W22VUriBae...
David MacQuigg, PhD Engineering Editor, Citizendium 520-721-4583

Notebooks and Spreadsheets often lack test assertions; which are critical to quality "Spreadsheet errors can have disastrous consequences – yet we keep making them" (2024) https://news.ycombinator.com/item?id=39132512 """ What are some Software Development methods for reducing errors: 1. AUTOMATED TESTS; test assertions To write spreadsheet tests: A. Write your own test assertion library for their macro language; write assertEqual() in VBscript and Apps Script. B. Use another language with a test library and a test runner; e.g. Python and the `assert` keyword, unittest.TestCase().assertEqual() or pytest. C. Test the spreadsheet GUI with something like AutoHotKey. From https://news.ycombinator.com/item?id=35896192 :
The Scientific Method is testing, so testing (tests, assertions, fixtures) should be core to any scientific workflow system.
awesome-jupyter#testing: https://github.com/markusschanta/awesome-jupyter#testing
ml-tooling/best-of-jupyter lists papermill/papermill under "Interactive Widgets/Visualization" https://github.com/ml-tooling/best-of-jupyter#interactive-wi... """
TIL about K-16: - K12CS: K-12 CS - Q12: Quantum K12 - P-12: Pre-K - 12 Exercise: - 1. Khanmigo > Tutoring help in Math > ~ask for review questions in [addition of 3 digit numbers] - 2. Create a notebook in e.g. JupyterLite. This is in the "percent format" that jupytext and various other IDEs support. `# %%` is the input cell delimiter: ```python # %% 321+123 # %% x = 321 y = 321 + 123 print([x, y]) # %% assert 321 + 123 == 444 assert 444 - 321 == 123 # %% import unittest; test = unittest.TestCase() test.assertEqual(321+123, 444) test.assertEqual(444-321, 123) test.assertEqual(444-123, 321) # %% test_cases = [ [1,2, 3], [123, 321, 444], [100, 214, 314], #[1, 2, 5] ] for a,b,c in test_cases: test.assertEqual(a+b, c) test.assertEqual(c-b, a) test.assertEqual(c-a, b) # %% print([a, b, c]) print(f"Hello World: {x} + {y} = {z}") ``` ; Test assertions for Science On Thu, Jan 25, 2024, 7:43 PM kirby urner <kirby.urner@gmail.com> wrote:
Thanks for jumping in David.
I concur, the Excel environment is a productive "home base" for deriving the visualizations and is in many cases is sufficient.
In the Office model, one is then expected to embed said visualizations in a Word document, perhaps exporting to PDF, if wanting to add more verbiage and/or make it more journal article or textbook like. [1]
In your type of advocacy work, maybe getting the visualizations is sufficient, and indeed, the final step from Jupyter Notebook to a PDF version is sometimes the trickiest, when it comes to page breaks especially.
Here's a Notebook in the same ballpark, dealing with the half life of naturally occurring and/or artificially generated radioactive substances:
https://nbviewer.org/github/4dsolutions/School_of_Tomorrow/blob/master/isoto...
This is the classic synergy of Jupyter + pandas + matplotlib, the kind of thing I've been teaching through a Turkey-based company. [2]
I don't see it as either / or, and true, Jupyter might be the wrong tool in many instances. I wonder if you've had a chance to play with pandas inside of Excel. I know Microsoft has added that.
I've yet to try it out (currently, I don't have a computer with Office at my fingertips).
Kirby
PS: in my previous post I had a typo buried in the most mathy part, which I've since fixed on Github. https://groups.io/g/synergeo/message/2481
[1] https://www.theatlantic.com/science/archive/2018/04/the-scientific-paper-is-... (Atlantic has implemented more of a firewall then previously -- the article is about Wolfram's Mathematica as well as Jupyter)
[2] https://nbviewer.org/github/4dsolutions/clarusway_data_analysis/blob/main/DA...
On Thu, Jan 25, 2024 at 1:18 PM David MacQuigg <macquigg@gmail.com> wrote:
Hello Kirby
Jupyter is excellent, but I still wish there was a simple built-in charting tool in Python. Jupyter is like Sketchup, a tool I use once a year, but not enough to justify keeping up on it.
My work now is focused on nuclear power <https://citizendium.org/wiki/Nuclear_power_reconsidered>, and educating journalists who might break with the mainstream and need a good summary of facts and arguments. That occasionally requires me to make a quick calculation and plot, and I find myself using Google Sheets instead of Python. Here is an example on Separative Work Units, the fundamental measure of cost in uranium enrichment. Once you get the calculation worked out, the plot is just a few more clicks.
https://docs.google.com/spreadsheets/d/1OyKPyjo6k1ckZVwAh8sfkDEtB5W22VUriBae...
David MacQuigg, PhD Engineering Editor, Citizendium 520-721-4583
_______________________________________________ Edu-sig mailing list -- edu-sig@python.org To unsubscribe send an email to edu-sig-leave@python.org https://mail.python.org/mailman3/lists/edu-sig.python.org/ Member address: wes.turner@gmail.com
participants (3)
-
David MacQuigg
-
kirby urner
-
Wes Turner