Hello and welcome to our blog. We are students of Dominikos Theotokopoulos secondary school which is in Heraklion -Crete in the South of Greece.We have thought of creating this blog in order to have fan during our science lessons. We want to show other students that learning science is interesting and great fun.

Friday, November 22, 2013

Solving a maze

by Unknown  |  in Hour Of Code at  Friday, November 22, 2013

The mazes can be found at http://blockly-demo.appspot.com.

The purpose of this program is to learn how programming works. In other words, using sliding elements with actions, such as "Move forward", "turn right", "if there is a path do", "repeat until" etc., the little man in the illustration aims to reach the red flag.


The solution of the above maze is shown in the accompanying diagram. The main idea is to follow always the left path till we reach our destination.


 
Initially, using the command "repeat until" saves space and time, since there is no need to repeat the same command. Then, the application "if there is a path to the left do ... else" first checks if there is a path left to turn otherwise to execute the instructions in the "else" statement. The second priority is if the little man has the ability to go straight and finally, as last resort we turn right.
written by Fragedaki Klio & Ksenikou Maria

0 comments:

© 2013 Meeting Point Design By BloggerTheme9 And Modified By GaziAggelos
Proudly Powered by Blogger.