The Springfield Elementary School Math team is competing against Waverly Hills Elementary's Math team, in an event organized by Benjamin, Doug and Gary. Lisa boasts that their poor school will surprise them all, which they do by scoring no points at all. Lisa is especially despondent, because Waverly Hills Elementary is much richer than Springfield Elementary, and thus can afford the latest in technology, while Springfield Elementary is stuck using antiquated tools. After this educational embarrassment, the nerds decide to modernize Springfield Elementary School by cutting a massive check directly to Skinner (similar to Mark Zuckerberg's $100 million direct donations to the public schools of Newark, NJ) which enables each student to receive a tablet connected to a school network, replacing the blackboards with a giant touch screen device and even building a 3D printing lab.
Since all books are now digital, Principal Skinner decides to burn the "old" paper books. But a meltdown in the server breaks every single digital device in the school. As all the paper books were destroyed, the teachers have nothing they can use to teach the students. Miss Hoover shows a movie in her cellphone. Lisa, unable to see the movie, looks out the window and sees Groundskeeper Willie using a rope with equally spaced knots to measure some grass patches. This gives Lisa the idea to turn the school into a Waldorf School, based on hands-on activities and creative play.
All the kids like the new system, and Willie is promoted to math team coach. While teaching the math team, Willie sees that Superintendent Chalmers is abusing his services and tries to chase him down. During the chase, Bart throws an egg and hits Chalmers in the head, making him crash his car into a tree. Surprised by Bart's capacity of calculating angles, Willie invites Bart to be the new math team captain. Later, the Waverly Hills Elementary and Springfield Elementary Math teams have a rematch, but Bart is unprepared, as he did not realize there would be math (despite Lisa telling him there would be nothing but math). Despite this, the score is tied (29-29), and the teams are given a final: in a M shaped figure, the competitors have to draw three straight lines to form 9 non-overlapping triangles. All the competitors are stumped, until Bart remembers the "M" shaped hair in Homer's head and finds the solution, leading the Springfield Elementary's Math Team to victory. Lisa is very happy, though she's also horrified when Willie admits that the rope-measuring technique he showed her was actually based on a device designed to torture and kill sheep.