Exercise 5: One definition, “infinite” uses

One definition, “infinite” uses

Something VERY important is that a procedure is defined only once and then can be used every time you may need it, as any other command.

Thus, its name must be unique within the entire program (you already know that the computer only follows orders and, in the event there was more that one procedure with the same name, it wouldn't know which to follow).

In order to make things easier for you, from now on (but not always) we will offer to you some parts of the solution of the problem, so you will only focus on what we want you to do. Sometimes you will be able to see that code in the tab Library, and sometimes we will let you know it in the instructions or in the “help”…pay attention!

Write a program which drops 9 green stones in the current cell, using the procedure “Drop3Green” that you previously created.

Give me a hint!

Remember that procedures are defined only once, and Drop3Green was defined by you in one of the previous exercises.

So you simply have to use it, thinking carefully how may times you need to do it.

You must sign in before submitting your solutions

Oops, your solution didn't work

  • Check that your program does not have recursion or an infinite loop
  • Check that you have an internet connection
  • Wait a while and try again

We are processing you solution

Please press F5 if results are not displayed after a few seconds