Category Archives: math

PI DAY 2018!

Happy pi day!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Pi Day as a holiday is 30 years old this year (unless someone had been celebrating quietly on 3/14’s before Larry Shaw publicly founded Pi Day at the San Francisco Exploratorium in 1988)!

While last year was a pi day snow day for us, this year the snow has mostly missed us in Maryland, while Boston area folks have had several huge storms in a row, and some of them do have a pi day snow day today!

The day was off to a good start this morning with a beautiful pi day sunrise:

I was up early to buy some pies, as per usual, when I stumbled across a pi-day pie sale! While I’ve seen photos of these before on social media, this is the first time I’ve actually come across one in person on a pi day myself!


I made my chalkboard a little busier than usual, including a few extra pi facts:

I also wore a new pi tie today (some years I’ve worn pi t-shirts). You can’t tell from the photo, but the image/pattern is made up of pi’s digits!

My first period AP CS A (Java / object-oriented programming class, with juniors and seniors) is the only class I did a pi-focused lesson with this year. In my other classes, we took a ten-minute pi and pie break, and talked about pi facts while eating, then back to our regularly-scheduled lesson. But in AP CS A, we coded an infinite series for pi in Java. We used the Leibniz formula, relatively easy to understand and code: 1/1 – 1/3 + 1/5 – 1/7 + 1/9 – 1/11 + 1/13 – …

This actually converges fairly slowly, compared to other infinite series for pi. Here are the results after ten terms, with the terms included on the left, and the running summation on the right of each line:

Here we are after 1000 iterations, just the sums:

And after a million terms, we’re getting pi accurate to five digits:

A million terms took a few minutes to run, so we didn’t dare try ten million, for fear we would break our ancient computers! Nor did we try to break the record of 22 trillion digits of pi, which would need many many times more terms if we were to use this series 🙂

Also today, in other news, a nationwide walkout against gun violence, which students at my school participated in as well. And I took two students on a field trip; the students had built a custom-engineered bicycle for a kid with a disability last month during National Engineering Week, and today we got to deliver the bike to the kid and his mother. So that was pretty cool.

Anyway, that’s how my day went, hope your pi day was similarly awesome!

Here’s my round-up of a few Pi Links:

And a few really creative pi-related photos, found via Twitter (linked to their sources):


Leave a comment

Filed under computer science, math, teaching

Number Systems

Binary and hexadecimal today in AP CSP:



When I was in elementary school, I was fascinated with number systems. I know I read about some different number systems used by different cultures through history in a book of number history my parents had, and was also inspired by some discussion of binary / ternary / base-4 in The Math Curse. I asked my mom to explain them, and she did.

Somehow (I forget the source, if it was a news article or an “interesting fact” in some book), I got really into the Inupiaq number system, both the symbols and the base-20 place value system for writing them. I remember writing the date in the upper right-hand corners of my papers using Inupiaq numerals each day in Mrs. McCarthy’s 4th grade class (or was it 6th grade? — she was my teacher both those years).

Always lots of fun teaching number systems! One of my favorite topics. 🙂

#day16 #apcsp #teach180 #180blog

Leave a comment

Filed under computer science, math, teaching

Daily Agendas on Google Docs

I’ve been doing this with a few classes for the past two years, but this year made the move to all: I keep a Google Doc with the day’s agenda for each class. This is useful as a central location from which all of the day’s activities can progress, with links to assignment documents, links to online quizzes, links to videos, and links to resources all embedded in there. In review surveys at the end of each class, this has consistently been a highlight and something they really appreciate. For example: “The links on the agenda and the directions that gave us to do what we had to do”, and “Somenthing that I really liked about this class was the agenda because if by any reason you was absent you just have to go to the online agenda and you can make up from your home.”

Because of these reviews, this year I’m moving to all classes having an online agenda. Combined with the fact that I’m a fan of the website for shortening and choosing your own url, I was laughing with a few of my students this afternoon that today I had my students use 5 different tinyurls for these agendas (and of course have to keep them straight in my head):


[Year 12, Day 2 post]


Leave a comment

Filed under computer science, engineering, math, teaching

Year 12, Day 0

This week teachers headed into school to prepare for next week and students’ return. This will be my twelfth year!

My teaching this year will include more computer science than ever before:

  • AP Computer Science Principles (full year)
  • AP Computer Science A (full year)
  • Foundations of Computer Science  (spring)
  • Computer Integrated Manufacturing (fall)
  • Precalculus independent study (fall, three students, three separate periods)

I’ll also be working with our new engineering teacher and our librarian+new-computer-science-teacher to help them with their lessons, and collaborating with two geometry teachers around standards-based-grading.

Extracurricular activities and competitions:

  • Coding Club (app development, cybersecurity, & more)
  • Women’s Transportation Seminar’s “Transportation You!” Mentoring Program
  • TRAC bridge builder competition
  • CyberPatriot competition
  • STEM Competition
  • possible (in my mind, I want to do each of these this year): Cyber Movie Mondays, Saturday AP & PLTW study groups, Girls Who Code club
  • probably several others…

Ongoing projects that will occupy some of my time this year include:

  • Comp Hydro (teaching hydrology and flooding through computational simulations & modeling, in partnership with the Baltimore Ecosystem Study)
  • MyDesign (engineering design process app and learning management system, in partnership with NSF & the University of Maryland)
  • Internet of Things project to measure air quality and other environmental factors in schools (in partnership with Cool Green Schools, Johns Hopkins University, and Morgan State University)
  • Continuing work toward my Master’s Degree in Computer Science (taking “Artificial Intelligence ” course this semester)
  • Baltimore City Engineering Alliance, a nonprofit 501(c)(3) we created to provide opportunities to Baltimore City students to further their engineering education, and for which I am treasurer

School starts for students on Tuesday, after Labor Day for the first time in my twelve years here teaching in Baltimore. Wish us luck!

Leave a comment

Filed under computer science, engineering, math, teaching

Pythagorean Triple Answers

As a follow-up to yesterday’s post, here are some answers and steps toward figuring out the scarcity (or frequency) of Pythagorean triple days (like yesterday 8/15/17) in a century:

I will mention I did not get the answer right away but needed some prompting (from a math-teacher colleague on Twitter), so I’ll take you through my thought processes.

  1. I have certain primitive Pythagorean triples memorized (like 9/40/41) — perhaps from several years of teaching geometry, or from studying number theory in college where integer (or rational) values for algebraic relations are important (cf. Euclid’s formula for Pythagorean triples, Diophantine Equations, & Fermat’s Last Theorem), or perhaps even a few recalled from taking high school geometry. In my head I tried these, saw several had occurred already in the past (5/12/13), while others were not interpretable as months days and years, like 9/40/41 (since there are max 31 days in a month). To go beyond the primitive triples, I tried multiplying each times 2, times 3, etc. In this way I discovered yet to come this century: 10/24/26 (twice 5/12/13) and 12/16/20 (quadruple 3/4/5).
  2. I thought I had them all, but had forgotten some primitive triples, like 7/24/25! At this point, referring to this list of primitive Pythagorean triples, I tried to systematically enumerate all with a≤12, then go through multiples of those until all values were larger than 12 (and therefore none could fill the month slot). I did this in Excel, color coding as blue dates already past, yellow yet to come, and red invalid date formats:excel1
  3. In creating that chart I did mentally transpose months and dates to see for example, that 12/5/13 could also work as a Pythagorean triple date in addition to 5/12/13. But this only yielded more in the past so I didn’t bother to write them out. My fatal flaw, though, was not permutating with the years also, so I neglected to find two more future dates: 7/25/24 and 10/26/24. After realizing this, I did add more to my Excel chart, going through each permutation that yielded a valid date in rows below the main ones:excel2
  4. I do believe this is now a complete list of past, present, and future Pythagorean triple days, written month/day/year. By my count there will be a total of 28 this century, 23 now past and 5 still in the future. Let me know if I missed any!


By the way, here’s an awesome interactive generator of Pythagorean triples by Vincent Pantaloni (shared on twitter).





Leave a comment

Filed under math, teaching

Happy Pythagorean Triple Day!

Today is 8/15/17 (abbreviating the year to two digits), which are three natural numbers that make up a Pythagorean triple! That is, three numbers that satisfy the equation from the Pythagorean Theorem a2 + b2 = c2 , and therefore make up valid integer side lengths on a right triangle.

Try it! 82 is 64, plus 152 (225), makes 289, which is 172 .

In fact, 8/15/17 is even more special than other Pythagorean triple days like 6/8/10, or 12/9/15, since it is a primitive Pythagorean triple: that is, its numbers share no common factor (e.g. 6/8/10 all share a 2, which if factored out yields the more familiar 3/4/5).


A great question to ponder: how many more Pythagorean triple days will we have this century? (question and image from Chris Smith, on Twitter)



Also, how many already occurred (and perhaps we didn’t even realize it)?


Will post answers to these questions tomorrow…

1 Comment

Filed under math, teaching

Pi Day Snow Day!

After a winter with no snow (no snow that’s stuck, anyway, there’ve been flakes in the air a few times), it’s a pi day miracle: a snow day!

Last night, when the call was made, we were predicted to get 6-12″, but with more sleet than snow, we’re on the low end of that range or a bit less. Here’s a joke I’m stealing from my friend Matt:

In honor of pi day, and with the extra free time of a snow day, I baked a quiche pi!


I tried to arrange the broccoli in the shape of the symbol π (pi), which you can see if you look closely 🙂 I’ve outlined it below.


And, of course, I had to break out my pi cutter to slice it with!


If you’re more ambitious than I am with your pi day baking needs, you could  try a “celebrity chef” pie, or Vi Hart’s Venn Pi-agram (she has both a dessert pie and a pizza pie version):

In Pi Day news, there have now been over 22 trillion digits of pi calculated! Hooray!

Whether or not you, too, are snowed in, have a wonderful pi day, and check out some of the following links!

Even though there are skeptics out there,

I agree with Cookie Monster:

Me love pi (and pie)!

1 Comment

Filed under math