Showing posts with label music. Show all posts
Showing posts with label music. Show all posts

Thursday, July 23, 2015

tmbg inspired primes, perfect, deficient and abundant numbers

A quick conversation summary, inspired by They Might Be Giants kids song: Seven



J1: why is the only way to subtract 7's by using up all the cake?
J0: they are really hungry because they are primes. They only have 2 proper factors.
J2: hmm, then what about 6? I guess 6 doesn't like cake?
J1: oh, the other numbers like cake, they just aren't as hungry if they have a lot of factors.
J2: what about 144? 144 must really not need to eat much extra!

Wednesday, June 17, 2015

Drawing, While and Music (5th and 6th Grade Programming)

Who: Baan PathomTham 5th and 6th grades
Where: at school
When: Monday morning

Fifth Grade

Questions and observations from the homework
This week, the students had noticed two things. First, though everyone was asked to draw a triangle as part of the homework, all the versions were different. They've seen this before, but I really like to emphasize that there is no single right answer.

Second, Jung had been playing with message program from the homework and noticed: "it doesn't do anything!" We talked about what they expected would happen (it would write "Hello you" twice). Then I showed them the test panel, where the output from see gets displayed. For some reason, this panel is often closed, so it wasn't surprising that Jung didn't see any output. However, now, they got a surprise because the output still wasn't what they expected. That led us to talk about literal strings and variables and then do an example with write instead of see.

Challenge 1: A map puzzle
For our first challenge of the day, we used a program that Chunly wrote:

My question: can they make this same picture, but without the purple tail on the green dot?
Everyone completed this challenge, but, given the many ways to move the turtle and to draw something, they all had different approaches:

  1. Movement: adjust the purple line from the start, jump back to the origin, use home() to get back, or retrace the path the turtle had originally followed
  2. Drawing: draw a new dot, draw green over the dot, start drawing the purple line only at the edge of the green dot

This simple example got us to experiment with several new commands: home(), pu(), pd(). Again, it reinforced the message that there are many paths to the target destination.


Challenge 2: A plum triangle
For the second challenge, we used Pitchee's triangle from the homework. She had created an isosceles right triangle through trial and error on the hypotenuse length:

For this challenge, we added scale 10 at the start of the program (to make all the drawing elements gigantic) and ht() at the end so that the turtle wouldn't block our view. Following this, we started discussing:
What did we notice? Why was it like that? What could we do to fix it? Is this a bug or a feature?
This is something we will continue next class.

Homework
For this week, the homework is to test out the code on the right side of this page:

Sixth Grade

While we make music
Last week, students noticed the play command. I wanted to build on this by giving them more examples of ABC notation,  but I also wanted to review while and logic keywords if, and, or. In retrospect, this idea was too ambitious for one class.

Through a series of stages, I wanted them to think about how many times each line of music got played based on when and how often the conditions in the if statements were true. This was actually hard to tell and it would have been better to give them visual signals instead (or in addition).

I think we will have to return to these key words again next week. We will also discuss the guessing game that we've been writing.

Projects begin
Last week, the kids submitted outlines for their term projects. These are the ideas:

  • Boongie: a clue-and-guess game where the computer plays different animal sounds and then the player enters the name of the animal.
  • Win: a driving game where we control a car that drives along a path avoiding obstacles. The screen mechanism he wants is  to keep the car fixed vertically and have the path scroll down.
  • Gan: a chasing game where we try to move around the screen collecting point-objects while avoiding bombs and keeping away from an enemy turtle who is chasing us. 
  • Titus: a version of space invaders.

Homework
The homework for each depends on their project:




  • Boongie: Find sound files for as many animal sounds as he can locate
  • Win: work on how to control the car's left-right position with the mouse, while keeping the vertical position fixed.
  • Gan: he had found a program that did many of the things he wants in his game. One homework element is to go through that code and come up with questions about thins he doesn't understand. The second component is to figure out how to create point-objects to appear randomly on the screen.
  • Titus: Create a sprite that can shoot lasers. 

Wednesday, June 10, 2015

Sunburst and guessing (5th and 6th grade programming)

Who: Baan PathomTham 5th and 6th grades
Where: at school
When: Monday morning

Fifth Grade

Note: My original intention was to focus on discussing the homework and making some extensions. Because one student wasn't in school and I had especially wanted to use her code, we changed plan slightly.

Other interesting code
Between classes, the students spent a lot of time exploring code they found from other people. I started by asking whether they saw anything that was interesting and they wanted to understand better. There was a quick response, focusing on two programs:

  1. The jump command in this sun: http://jung.pencilcode.net/home/sun
  2. How to make new turtles, like in this chasing game: http://tatia512.pencilcode.net/home/otherpeople/Chase1

These were really great questions and gave us two interesting examples of how to understand code that we find.

Jump (jump, jump)
Basically, I walked the student through the process I follow for understanding a new command: play with it, test it, put it in a bunch of different situations, and see what happens. We created new files (mostly with names like jumpPlay) and then started adding jump commands. It quickly became clear that we needed something to help us see what was happening, where the turtle was jumping from and to, so we started adding dot between the jump commands.

I asked them to keep playing and testing until they thought they understood jump.  While waiting, I wrote a little code with some jump lines and, for a twist, an rt 90 in between. When they said they understood, I asked them to guess what my code would do. The effect of changing the turtle's direction surprised everyone, but soon they had a new explanation.

We wrapped up this section by briefly discussing a picture of grid coordinates, but this will have to be continued next session.

Hatch
The chase game uses 3 turtles, so how do we create the extra 2? I pointed out the hatch command and then we followed some of the same steps as for jump. We didn't have time for me to do a challenge program to test their understanding, but we can include that in the next session as well.

Context
Both jump and the chase program illustrate the importance of context to understanding the code. In the case of jump, copying an isolated line from the sun program will still create sensible code, but it might not do the same thing if the turtle isn't starting in the same location or pointing in the same direction. For the chase program, though, there are many lines of code that simply can't be interpreted if taken out of context. For example, line 15:
e.jumpto -250,-100
Because this requires an object e, it has to be preceded with code that defines or creates that object.

Homework
For homework, I asked the students to notice and wonder about any interesting code they find. In addition, I wanted them to try to create the pictures on the left hand side of this set of exercises:

Sixth Grade

Guest Teacher
For sixth grade, we had a guest teacher: Win. They are currently trying to solve a problem that he attacked in his project from last term, so I asked him to talk about his prior solution. In that case, he had two loops running, one for loop to ask many calculation questions and an inner while loop to give the student several chances to get the right answer. In our case, we are currently working on improving our guessing games so that the player has multiple chances to guess.

A musical interruption
As Grade 5 had found, there is a lot of interesting code out there. Several students had found a snippet of music playing code and wanted to investigate. I have to admit I didn't handle this unexpected interest as well as I had for the earlier class. I will craft an exercise related to ABC notation and the play command for next class.

homework
Since I want to build on the guessing game, we need to finish that code. Homework this week is to add the right components so that the basic guessing game is complete:

  • a random number is chosen
  • the player gets several chances to guess the number
  • after each guess, they get feedback on whether their guess was too high or too low (if it wasn't correct)
The part that is currently challenging is to create a loop that will allow multiple chances.

Thursday, March 12, 2015

Castle Logix (product review)

This is in the spirit of Chris Danielson's product reviews at Talking Math with Your Kids.

Who: J2
Where: dining room
When: after lunch
What: Castle Logix block set.

Ok, this is Castle Logix:


There are 4 cuboids with holes in their sides and pictures on other sides, three different length cylinders with cones topped by spheres on one end, and the cylinders fit into the holes in the cuboids.

J2 has found two new uses:
1. Rhythm sticks
2. Combinatorics challenge

Rhythm sticks

Really, this is just a fancy way to say that he started beating them together. Or maybe I did? Anyway, he found it a good instrument for listening to Suzuki violin pieces and practicing the rhythm along with the video:


Of course, you can bash together any two things, so what makes these blocks so perfect?
They are a good size, relatively large, but still comfortable for a small 5 year old to hold. They are a bit heavy, so you have to commit to each beat and can't be halfhearted about the game. Most importantly, the holes seem to amplify the sound and make a very satisfying clack. Oh, they are also sturdy enough to take the abuse and seem unaffected.

Conclusion: Two thumbs up (but keep those thumbs on the outside when you are bashing)!

Note: mommy was not around at this time. Your experience may vary depending on who is present during play and time of day. . .

Combinatorics challenge

This is something we are just starting, but the basic questions are:
  • How many ways can you put together the Castle Logix pieces?
  • What do we even mean by "put together" anyway?
  • When do two configurations count as the same?

I will report back as we work through these questions.