Dog, cat and mouse game

photo (40)

Code:  http://hop.sc/1boRaOt

This is a game where the mouse circles around and the dog walks from side to side. The cat moves with the position of the iPad:  up, down, right, and left.  When the cat bumps into the tree it moves a bit.  When the cat runs into the mouse some ‘mm’ lines are drawn and when the cat bumps into the dog some grey lines appear as the cat is frightened.

 

What’s wrong with this model of space?

photo (32)

In this program, the moon rotates around the Earth.  Notice the position of the shadows of the moon?  Is this a correct model?  The correct sighting of the moon during the month could be posted.  I’ve posted the full moon and the day we do not see the moon.

http://hop.sc/1fzOx0z

For more information about space, constellations, events, and field trips to observe the sky consult:

http://www.astrolab-parc-national-mont-megantic.org/fr/astronomie.voir-dans-ciel.htm

 

Designing a green building with algae using Hopscotch

Using the basics of Hopscotch, it is possible to create all kinds of projects.  Coding drawings using all types of shapes, maps of the school grounds or coding blueprints becomes quite feasible.  In the past, my grade 5 students have created models of buildings that use renewable energy.  Before constructing the model in 3D, it is possible to sketch the model using Hopsctoch first.  Here is an article that discuss a building that could be fueled with green algae.  An inspiring design for the future.

http://weburbanist.com/2013/05/02/algae-fueled-building-worlds-first-bio-adaptive-facade/

photo (30)

The following link provides the code for the algae-powered house.  It can be viewed using Hopscotch on an iPad.

http://hop.sc/JSEb1g

 

 

Loops in Hopscotch

Being able to create loops while coding is an important part of knowing how to code.  I’ll show you how to create a square without loops, with loops and how to make many squares with many loops.

photo (27)

Every instruction to write a line and turn is explicitly coded.   We notice however that there is repetition in the code.  For a square, all we need is to draw one side, turn and repeat the same thing 4 times.  With the repeat command, we can see the power of writing code simply.

photo (26)

 

Both versions draw a square.  With repetition, the code is shorter.

It is possible to add more levels of repetition to draw many squares.  I added squares of random colors and random side length.

photo (28)

 

and you get the following result.

photo (29)

 

The code for the many squares is as follows.  It can be viewed using Hopscotch on the iPad.

http://hop.sc/1ftt0Hw

 

Shapes

photo (25)

I found myself teaching mathematics for one period, supplying for my English counterpart.  We had paper and my personal iPad.  Since they were studying shapes, it was logical to extend this learning using Hopscotch.  We wrote the programs first on paper and then we tested it with my personal iPad.  In grade 3, we discussed how to code a square and in grade 4, we discussed how to code a pentagon.

The sides of a square are all equal and there is an angle of 90 degrees between each sides.  The code would look like something like this.

laisser une trace

se déplacer 100

touner 90 degrés

se déplacer 100

tourner 90 degrés

se déplacer 100

touner 90 degrés

se déplacer 100

touner 90 degrés

In grade 4, we wrote on paper the code for the pentagon then tested on my iPad.  The test was important to make sure we had guessed the angles properly.  The above picture was the result.

 

Making a spiral using Hopscotch variables

photo (23)

The above spiral is done with the following code.  The link can be opened in Hopscotch using an iPad.

http://hop.sc/1dpN2jM

In order to create a spiral, we need a new concept, the variable.  A variable is a location that than contain a number.   This number can be changed as we wish or as we program it.  For example if we set a variable called DISTANCE and give it a value 10 and I say move DISTANCE, the object is going to travel 10 units.  If we set a variable called DISTANCE and increase its value by 5.  The value of DISTANCE is now 15.  I we now say move DISTANCE, the object is going to travel 15 units.

 

photo (24)

 

The spiral is just increasingly longer lines being written while changing directions slightly.

 

Hopscotch stars

photo (22)

 

The Hopscotch company has a coding curriculum available with some lessons on the basics of coding using Hopscotch.  It will soon be available to everyone.  One of the programs was how to code stars.  I decided to code a slightly different kind of star. The stars appear when a sound is made using a random color and at a random location.

The following link can be viewed using an iPad and Hopscotch.

http://hop.sc/JwrpG6

 

A volcano simulation using Hopscotch

Hopscotch is great to program scientific simulations.  For example, in grade 4 rocks and minerals we study all types of rocks and their formations.  Understanding how a volcano works becomes quite interesting.   Students can show their knowledge in various ways, including a Hopscotch simulation of a volcano.  Some of my students were quite interested and attempted to program the volcano I had showed them out of interest.

This link can be opened with an iPad and the Hopscotch app.

http://hop.sc/19oR4tY

This project was about rock cycles.  The coding was just a small part of the entire project that was presented using BookCreator.

 

photo (2)

 

 

A Hopscotch Clock

photo (21)

It is possible to code a clock using Hopscotch.  In this program, there is the seconds hand that moves according to its time.  This program also helps with learning coordinates since each number object has been placed on the screen individually.

The following link can be opened with an iPad and Hopscotch.  It shows the code for the above program.

http://hop.sc/1hbSKZr