# Spooky Halloween Programs

## The Activities

2. Topic: Programming, Functions:
 The functions: Scream { ___Print “B” ___Do 2 times { ______Print “O” ___} ___Print “!” } Ghost (Box_X) { ___Print “I saw” ___Print Box_X ___Print “ghosts!” } AfraidOf(Box_X, Box_Y) { ___Print Box_X ___Print “ is afraid of “ ___Print Box_Y }

The programs:

 Print “Lisa shouted” Scream Do 4 times { ___Scream } Ghost(799) Print “Siddarth said” Ghost(10) Print “Rachel said” Ghost(“scary”) Print “Elsa said” Ghost(“Anna”) AfraidOf(“Lyle”, “zombies”) AfraidOf(“Carol”, “fairies”) AfraidOf(“Witch”, “Lucy”) Print “Corey said” Ghost(20) Print “The ghost said” Scream AfraidOf(“Corey”, “ghosts”)
3. Topic: Maps, Spatial Reasoning, Logic:Fill in a map of a treat-or-treating neighborhood based on the following clues.
1. Each house is the same shape and size as your house.
2. Directly to the West of your house is the Witch’s house.
3. The Zombie house is 2 houses West of the Witch’s house.
4. Olaf’s house is across the street from the Zombie’s house.
5. Elsa’s house is directly South of the Witch’s house.
6. The pumpkin house is directly East of your house.
7. The Spider house is on the very West end of the South side of the street.
8. The Butterfly is scared of the Spider. The Butterfly’s house is on the same side of the street as the Spider’s, but as far away as possible.
9. The Goblin is between the Zombie and the Witch.
10. The skeleton is directly across the street from the Spider.
11. Next to Elsa’s house is a Graveyard that takes up two houses.
12. The Ladybug’s house is right next to the Butterfly’s.
13. The Fairy can fly right across the street to the Ladybug’s house.
14. The Wizard’s house is East of the Fairy’s.
15. Anna’s house is next to Elsa’s house.

The empty neighborhood map.

4. Topic: Estimating: How many of various objects fit inside a small skeleton bucket?  One of the items were Smarties candies, and the closest kid got 5 Smarties, and the other got 4.

The estimating skulls.

## How did it go?

We had 5 kids at circle this week. We did Halloween-themed math.  Everyone was excited to get a (tiny) candy treat at the end.

#### Programming with Functions

This went really well this week.  Everyone loved the Halloween-themed programs, and again they loved having their names in the programs.

Yesterday we bought a laminator and laminated our programming worksheet, so the kids could erase their programs when they finished.  The kids all enjoyed using dry-erase markers to trace their programs.

The was a slight drama at the beginning because four kids all wanted a green marker, but we only had two.  So I took away both green markers.  The kids moved on quickly and chose new markers.

The first program was:

Print “Lisa shouted”
Scream

I asked the kids if they knew the command ‘Scream’ and they said no.  So I got out the sheet with the 3 function definitions and we all looked at the commands for scream.  The kids all successfully traced through ‘Scream’.  2 kids did it on their own.  The other 3 got it after I helped them.

The next few programs involved the Scream function, and everyone understood it easily.  Kid A loved predicting what the output would be, like shouting “Boo! Boo! Boo! Boo!” for

Do 4 times {
___Scream
}

Kid B started to write ‘Scream’ a few times, but I reminded her that she needed to do the commands in the Scream function instead.

Next I gave the kids:
Ghost(799)

Everyone wondered what the 799 meant.  We looked at the definition of the Ghost funciton, and I showed them how it tells them to put 799 in Box_X.  The kids did this, and then were able to complete the steps in Ghost.

When we got to
Print “Luke said”
Ghost(“scary”)

several of the kids were unsure whether it was legal to put “scary” in Box_X, but I assured them that was right.

Next was:
AfraidOf(“Sanjay”, “zombies”)

The kids were all excited by the word “zombies”.  I asked if they knew how to do this program.  I explained that AfraidOf tells you where to put each word.  The first should go in Box_X and the second in Box_Y.  After the kids assigned the variables, they had no trouble finishing AfraidOf.

Kid B several times still made the mistake of writing “AfraidOf” instead of following the steps in Afraid of.

The next program was:
AfraidOf(“Witch”, “Lyle”)

I think every kid got tricked and put Lyle in Box_X, instead of Witch, but I said again that the first word has to go in Box_X so they fixed it.  They all thought this was a funny program.

Finally I gave them the big program:

Print “Corey said”
Ghost (20)
Print “The ghost said”
Scream
AfraidOf(“Corey”, “ghosts”)

3 kids did this completely independently.  One kid needed a tiny bit of help.  The fifth kid needed a bit more, because she kept forgetting which line to go to in the main program after finishing a function.  So I held my finger in the main program to help keep track.

Kid C was extremely efficient at these programs.  She didn’t mess around at all, and was obviously working hard to try to finish first every time.  Kid A did quite well.  Kid D understood it all, but somehow took longer to trace through than other kids.  Kid B and Kid E needed a bit of one-on-one help to complete some of the programs.  Everyone seemed to enjoy the programs, and were excited to see what came next.

 My daughter at work on the hardest program. My daughter’s finished program.

#### Trick-or-Treat Maps

I gave everyone a map with a street and one house on it.  Then I started reading the clues.  At first the kids didn’t understand that the houses had to be right next to each other, but once they understood that, they were pretty good at drawing 4×4 squares on graph paper.  Kid Aunderstood every clue right away, and again worked hard to be first on each.  She would quickly draw her house, and then ask me how to spell the name.

The other 4 kids started to embellish their houses, drawing a pumpkin on top of the pumpkin house, for example.  Kid B had some trouble understanding the difference between “across the street” and “at the other end of the street”.

The clue “The zombie house is 2 houses West of the Witch’s house” was a bit tricky because they didn’t know whether to leave 2 empty houses or 1 one empty house.

The trickiest clue was “Next to Elsa’s house is a Graveyard that takes up two houses.” Kid A immediately realized that only one side of Elsa’s house had space for the graveyard.  Kid B started to say that she didn’t know which side of Elsa’s house to put the graveyard on, but then she noticed suddenly that it would only fit in one place.

One kid’s finished map.

#### Estimation

First we did the blue glass beads. The kids guesses ranged from 15 – 20.  Then Kid A peeked at my answer sheet and announced that the top two numbers were 38 and 30.  Kid B changed her guess to 38, and Kid C guessed 30.  So I skipped the yellow acorns which had 30 inside.

Next I brought out the paper clips.  The kids guessed between 40 and 100, but the answer was 204.

Finally I brought out the Smarties, and told them the winner gets an extra piece.  The guesses were between 100 and 598.  The answer was 160, and the closest kid was Kid B who was 66 off.

# Robot Dance Optimization

## The Activities

1. Topic: Charts: Book: The Great Graph Contest by Loreen Leedy.
2. Topics: Multiplication, Proofs: Prove that multiplication is commutative, i.e., x * y = y * x.
3. Topic: Programming: I did several robot dances.  The kids needed to write a program for that dance.  For example, R(ight turn)RRRJ(ump)F(orward)B(ackward)RRRRJ.  Then, they had to find the shortest program they could for that dance, using loops and functions.
4. Topic: Origami: We all worked in parallel, each kid (and I) making two simple models, a rolling toy and an envelope.

## How Did It Go?

All 6 kids made it this week again!

#### The Great Graph Contest

I asked the kids at the beginning what a graph was.  Kid 1 said they did graphs at school, and it was where they asked everyone a question and they said yes or no and then they saw who had more.  I asked for any other definitions, and Kid 2 said almost exactly the same thing.  I said those was one kind of graph but there were others.  The kids liked the book better than average I think, several kids said they liked it afterwards.

#### Writing Dance Programs

I performed several dances for them, and they had to write down the instructions for that dance.  I started with a simple dance, F(orward)B(ackward)BFJ(ump).  It was harder than expected.  I ended up doing it about 5 or 6 times.  By that time, all but Kid 1 had it correct (Kid 1 only had one B).

Next, I did R(ight)RRRJFBRRRJ.  Again, they had some issues keeping track of what I was doing.  After a while a several of the kids had correct programs.  Kids 1 and 2 were the fastest, followed by Kids 3 and 4, and then Kids 5 and 6.  About this time, Kid 5 said, unprompted, “Moopsy!”  I was very excited, because this was what I was looking for (Moopsy was a subprogram from last week), but Kid 5 didn’t follow up and use it.  After a little bit I hinted them towards Moopsy, and then several of them were able to quickly write the program in terms of Moopsy.

Finally, I did D(own)U(p)DUDUDUFBFBDUDUDUDU.  Kids 1 and 2 finished the whole thing, and Kids 3 and 4 made good progress.  Then I asked them who could do with the shortest program.  Kid 3 came up with “Do 4 times: DU FBFB Do 4 times: DU”.  It’s worth noting that most of the kids didn’t have any syntax; Kid 1 was the only one who wrote each instruction on a different line.  A couple kids mentioned Floopsy from the previous week (DUFB), which was usable but not super helpful.  Then I said “You can make up your own programs!”  Kid 1 did something interesting, Kid 1 erased the whole program and wrote “n” and then said that “n” was the whole program.  I said Kid 1 still needed to tell me what “n” meant, and Kid 1 got rather upset and said they didn’t know what I meant.  After a bit I was able to explain that I didn’t know how to do “n” so they needed to tell me.  But it turned out that wasn’t enough, and that the core problem was that the definition of the length of a program wasn’t clear.  So that’s something to be more careful about in the future.  Meanwhile, although most of the kids weren’t making progress (Kid 5 was busy writing the names “Poopsy” and “Peesie”), Kid 3 had written “t” and was doing DUDUDUDU.  I pointed this out to everyone and asked if they could write the program in terms of “t”, and several of them did.  I mentioned Kid 3 could use “do X times” inside “t”, and they did.  In the end, Kid 3 ended up defining “s” to be “FBFB”, so the final program was “tst”.

The kids are doing pretty well at programming, although there’s a noticeable range in ability among the kids.

After circle, our daughter kept working on her program with Corey and made a shorter program than we had come up with during circle.

#### Origami

We made two models, as a group, from the books “Origami: Fun with Paper Folding #5 and #8”.  The books don’t seem to be available online, but they’re pretty simple models, although a bit harder than the cat and dog we made last time.  One of the models was a cute rolling toy, and the other was an envelope.  There was lots and lots of “how do I do this step?” but everyone was doing pretty well.  The kids are good enough at making folds that I think we can try harder things in the near future, like the standard swan.  The kids all were able to handle the symmetry very well, once I showed them how to do one side they could do the other side without problems.  However, they did sometimes have problems when they were supposed to turn it and do the same thing on the other side.  A couple of the kids knew about “sandwich folds” and “hot dog folds” (for the two different initial ways of folding the paper in half).

# The Floopsy Oopsy Moopsy Dance

## The Activities

1. Topic: Biographies, Mathematicians: Book:  The Boy Who Loved Math: The Improbable Life of Paul Erdos, by Heiligman.
2. Topic: Division, Counting: Find all numbers between 1 and 100 that are divisible by 3, 4, 5, 6, 7, 8.

My daughter looks for numbers divisible by 4.

The numbers divisible by 5.

3. Topic: Programming: Do dance move programming, following functions.  Then write a dance for me.

The Commands and Functions

 Hands Up Hands Down Jump Forward Backward Down Up Turn Right Turn Left Floopsy ———— Down Up Forward Backward Moopsy ————- Turn Right Turn Right Turn Right Turn Right Jump Oopsy ———— Hands Up Down Hands Down Up

The Dance Programs

 Dance 1: Turn Right Turn Left Forward Forward Backward Dance 2: Do 3 three times: Hands Up Hands Down Jump Dance 3: Up Down Up Jump Hands Up Jump Dance 4: Jump Floopsy Oopsy Dance 5: Do 4 times: Moopsy Dance 6: Do 2 times: Hands Up Hands Down Floopsy Moopsy Oopsy

## How did it go?

All 6 kids were at circle again! I don’t think we’ve ever had such consistent attendance before!

#### The Boy Who Loved Math

The kids were all interested in the book. It’s about what a strange person Paul Erdos was, and how much he loved math.  I made sure to point out that he was studying the same things they were in circle: primes, combinatorics, etc.  They thought it was funny that he didn’t know how to take care of himself.  They were also intrigued that he died at a Math conference.

#### Division

Find all numbers between 1 and 100 that are divisible by 3, 4, 5, 6, 7, 8.  First I told the kids that ‘divisible by’ means you can make that many piles out of the that number of cubes.  I grabbed a handful of 10 cubes and made two piles. Each pile had the same number of cubes, so the kids said that 10 is divisible by 2.  Then I added one more cube, and they saw that 11 is not divisible by 2.

Next I gave each kid their own number between 3 and 8, and a bag of 100 cubes, and asked them to write down all numbers between 1 and 100 that are divisible by their number.  I put each kid somewhere on the floor.  Several of the kids did not initially understand what they were supposed to do, so I sat with each and explained one on one.

Kid A started off confused but then I showed him how 8 is divisible by 8, by making 8 piles each containing one cube.  Then I added a cube to each pile until we got to 16, which he saw was divisible too.  At that point he figured out that he did not need cubes and starting counting by 8.  He went all the way to 304 before he ran out of time.

Kid B had 5.  She understood the activity after I talked to her one-on-one. Interestingly, she wanted to write the number in letters and digits: thirty 30.  When I checked back after a few minutes she had gotten up to 40. I asked her if she saw any patterns, and she said, yes, it’s counting by 5s.  I suggested she could fill out the rest of the paper without using blue blocks, which she did.

Kid C had 7.  She came up with 7 and 14 by herself, but then she had written 23.  I said she should check that one, and she started it again.  It took awhile before she realized that counting by 7s would work, and even then, she had some trouble adding 7 to the higher numbers. I demonstrated by counting 7 on my fingers: 22 – 23 – 24 – 25 – 26 – 27 – 28, and then she successfully used that strategy to count by 7s to 98.

Kid D had 4.  She used the blocks very efficiently to get up to 56, counting by 4s. Then she mixed up her piles and got frustrated, but as she was starting to count out 56 blocks again, she realized she could count by 4s which she did up to 100.  She and Kid A (who had 8) finished first so I had them compare their charts.  They noticed that Kid A had written fewer numbers than Kid D, and they said it’s because her number is smaller. Kid D said that whoever had the smaller number would have to write down more numbers.

Kid E made a very elaborate chart like this:

1 yes no
2 yes no
3 yes no
4 yes no…

She used the cubes to test out whether each number was divisible by 3.  I asked her if she saw any pattern, and she said it was always yes no no, yes no no.  I asked if she could find all the numbers now without using cubes, but I think she continued to use cubes.  She only got up to 19, because she had such an elaborate chart.

Kid F was counting by sixes, using the cubes, however her cube strategy was very inefficient: For example she made 6 piles with 2 cubes in each, and then she counted all the cubes into one big pile to see how many she had.  This meant she’d have to lay out the cubes from scratch to find the next number.  She ended up with 6, 12, 24, 48.  I’m not sure if she was intentionally doubling the number each time.

#### The Programming Dance

David came up with this idea for our four year old son. David would say directions: forward, forward, turn right, backward…and our son would do them.  Then David came up with idea of making functions, e.g. ‘Fizzle’ means down up forward forward.  My kids loved this, so I decided to do it for circle.

I asked the kids if they like to dance?  All the girls shouted yes…Our one boy said no.  I said I had a computer dance for them.  Then I showed them the chart on the wall, and we did each command.  Next I pointed to ‘Floopsy’, and I said it meant we had to do all commands under it.

Then I gave each kid a copy of Program 1.  All the girls stood together in front of the command list and did the commands.  The boy didn’t want to dance so I said he didn’t have to.  For the next one, I had him read the program and I did the dance.  Then all the girls asked if they could do it too, so I handed a copy out to each.

Then I skipped to Dance 4. They quickly realized they had to refer to the command wall to remember what Floopsy meant.  At this point, the boy got interested and started to do the dances too.

Everyone begged to do all the dances, and no trouble with the idea of functions, or the loops.  They were pretty good at counting how many times they had done ‘Floopsy’ for example.

At this point one of the kids suggested that we should do all six dances in order.  Everyone else agreed, so they sorted their dances and started.  Everyone else was a bit chaotic because they all started at different times, but they were all engaged.

After this, I said they had 5 minutes to write a program dance that I would do.  They all cheered, and happily sat down to write a silly dance for me.  My daughter finished her dance first and it was something like:

Jump
Do 16 times
___Floopsy
___Oopsy

I started to do it, and laughed incredulously when I saw 16 times!  But everyone insisted I must do it, so I really did do it about 16 times.  This inspired the other kids who wrote various things for me to do 100 times or 200 times.  One kid then said she’d make me do it infinity times, and she knew how to write infinity as a sideways 8.

At this point, the kids introducing silly other commands, which I discouraged.  They particularly wanted to add ‘Shake your butt’, which I refused to do.  After that, everyone got pretty silly, writing variations on shake your butt.

Circled ended with lots of loud laughing and shouting, and excited kids taking home their dances…so success!

# Ponies go to Disneyland

## The Activities

1. Topic: Maps: Book: Mapping Penny’s World by Loreen Leedy.
2. Topics: Logic, Maps: My Little Ponies are at Disneyland, and the kids have to figure out which section of Disneyland each pony is currently visiting.  Each puzzle involves 6 ponies, and for each of the 2 sets of ponies, I had an easier and a harder puzzle.  Below, there is a picture with the solution for each puzzle, followed by the clues for that puzzle.  The map and clues are in this powerpoint, and these are the ponies.

• All ponies with a single hair color went to Fantasyland or Tomorrowland.
• One unicorn is north of the yellow pegasus, and the other is south.
• The purple unicorn is north of the other purple pony.
• There are no other ponies with the pegasi.

• No pony went to Fantasyland or Frontierland.
• Each pony went to a different place.
• The pegasi went to “lands”.
• The purple ponies are next to each other.
• The unicorns are next to each other.
• The orange-haired pony is north of the yellow-haired pony.

• 2 ponies went to Fantasyland.
• 2 Ponies went to Mickey’s Toontown
• One unicorn went to Adventureland, and the other went to Frontierland.
• Each blue pony is north of a white pony.
• The pegasi are together.

• No ponies went to Critter Country or Main Street U.S.A.
• Each pony went to a different place.
• The white ponies are next to each other.
• The ponies with 2 hair colors went to Tomorrowland, Adventureland, and New Orleans Square.
• Unicorns don’t like New Orleans.
• An earth pony (no horn or wings) went to Fantasyland.
• The blue ponies are next to each other.
3. Topic: Proofs, Numbers: Prove there is no largest number.
4. Topic: Programming: Another set of programs to trace.  The new thing this time was the combination of loops and self-assignment of variables.  We used the same worksheet.
 Program 1: ———- Box_A = 3 Box_B = 5 Box_A = Box_A × Box_B Box_B = Box_B + Box_A Print “Betsy_has_” Print Box_B Print “_toes.” Program 2: ———- Box_A = 0 Do 5 times: Box_A = Box_A + 1 Print “Steve_has_” Print Box_A Print “_legs.” Program 3: ———- Box_A = 0 Box_B = 2 Print “Odd_numbers:_” Do 5 times: Box_A = Box_A + Box_B Print “_” Print Box_A Program 4: ———- Box_A = 2 Box_B = 1 Do 4 times: Box_A = Box_A + Box_B Box_B = Box_B – Box_A Print “Lucy_ate_” Print Box_A Print “_in_” Print Box_B Print “_minutes.”

## How did it go?

All 6 kids attended this week.

#### Mapping Penny’s World

The kids said “yay” when the book came out, since we had read several Penny books before.  They didn’t comment on the book afterward though.

#### Ponies go to Disneyland

I divided the kids into two groups of three (Team X and Team Y), and then went back and forth helping each group.

The kids are quite good at reading now, they only had problems with a few words (pegasi, for example).  All of the kids were able to read most of the clues.  They all understood which direction was north, south, east, west.  But the concept of “Pony A is north of Pony B” was kind of tricky (Kid A got it backwards at one point).

The easy puzzles in each set weren’t too hard.  One of them had a clue “One of the unicorns is north of the yellow pegasus, the other is south”.  This turned out to uniquely identify where the yellow pegasus was, but it was kind of tricky — Kid A got confused, either with directions or got the clue reversed.  The other one had some pretty clear clues and was easy to just do a couple swaps to fix (although Team Y did have the wrong answer — they hadn’t obeyed one of the rules, which was fixable through a simple swap).  The hard problems were hard primarily because you had to keep a lot of information in your head in order to remember what legal swaps were (putting ponies on the board and then swapping them to try to satisfy the constraints was definitely the right thing to do).  Kid A (on Team X) was doing a good job with this, she usually remembered what was okay to swap. Team Y had a lot of problems with this.  They kept forgetting, even with lots of reminders from me, what were legal swaps subject to all the rules so far.  There was one point where they just needed to swap Rainbow Dash for another pony, but they kept trying a bunch of swaps that broke a rule.

Team X stayed on task most of the time (with a little help from Corey towards the end), but the other group lapsed into playing with the ponies a couple times while I was helping the other group.  Team X was able to make progress while I wasn’t there, and solved at least one while I was at the other table.  Team Y didn’t make much progress while I wasn’t there.  Team X ended up solving all the problems, while Team Y only solved 3.

I’m not sure how much Kids B and C contributed to the solving, but they both read some of the clues, and I saw Kid B add at least one pony to the map.

One thing that was very clear is that the right strategy is to put out a possible solution and then try to fix it.  A question for the future is how to make logic puzzles where it’s easier for the kids to check the constraints themselves.  Even though they could read pretty well, it was still not that easy for them to go through and check all the rules.  If we had the constraints it in a simple graphical language, then I could probably be more hands off and hopefully they would themselves get in the habit of checking the constraints frequently, which is I think what they need to do to get better at holding them in their heads better.

#### No Largest Number

First they said that you could keep counting and counting.  To make it more formal, I introduced the idea of proof by contradiction, and asked what the opposite of “There is no biggest number”.  Kid A said “There is a biggest number”.  Kid B said something about “There is no smallest number.”  I said, “Suppose there is a biggest number.  Let’s call it fibble.  Is there a bigger number?”  Very quickly, I got “Fibble-1” from Kid C and “Fibble + Fibble” from Kid D.  Corey was standing by and said “but maybe fibble + fibble is the biggest number?”  I said “But we assumed fibble was the biggest number.”  Proof by contradiction is a subtle idea, and they probably didn’t quite understand it, but it was still a good conversation.

#### Programming

My daughter and I discuss a programming problem

There wasn’t anything new this week, but we did combine loops with self-variable setting, which makes things much more difficult and interesting.  These programs were noticeably trickier than the previous week’s.  Kid A was the only one who got to problem #4 before time ran out.  One problem had multiplication, and the kids initially complained they couldn’t do multiplication; but as soon as they realized is was 3 X 5, at least a couple of kids immediately said 15.

The kids are all now very proficient at setting boxes to constants, and usually at printing things out.  But assignment to a variable involving an expression with other variables is still tricky.  Kid A had particular problems with complicated assignments, particularly inside loops; but Kid A was also the quickest at figuring out how to do the rest of the iterations of the loop after doing it 1 or 2 times.  A number of the kids needed to be walked through a number of iterations of each loop — one thing we need to introduce is making a tick mark next to every instruction as you execute it, so you can keep track of where you are.  One thing I saw this week that I hadn’t seen before (but Corey had) was mixing up string literals with semantic values, and names of variables with string literals.  Kid B had the most problems with variable names, at one point writing “Box A” as the value of Box A, and another time printing “Box A” as output at one point.  Kid C had trouble with the statement ‘Print “Odd numbers: “’.  First, Kid C started to output “Print”, and then once I said that you weren’t supposed to print “Print”, started printing the actual odd numbers 1 3 5 7.  Despite some challenges, I do think most of the kids understood that the program to print even numbers was adding 2 each time, and most of the kids were able to “production line” their evaluation after a few iterations.

Problem #4 involved adding and subtracting some small negative numbers; Kid A was working on this immediately after circle, and it turned out to be really hard, especially when coupled with a somewhat tricky loop.  So, we need to do more on negative numbers before trying this.  Also, the solution (accidentally) ended up being “Kid C ate -3 cookies in 2 minutes.”  We asked Kids A and D what this meant.  Kid D first said that it meant Kid C ate 3 crumbs, and then changed to 0 cookies.  Kid A, with a bit of help from me, said it was throwing up cookies.

As usual, the kids all were very into sentences like “Kid D has 20 toes” (Kid D showed us their  10 toes) and “Kid A has 5 arms”.