11-21-2013 HW e

posted Nov 20, 2013, 7:19 PM by Samuel Konstantinovich   [ updated Nov 20, 2013, 7:19 PM ]
HOMEWORK: You are responsible for watching Tutorials: 8, 9, 10. If I am done with jury duty, you will have a quiz on these videos. 

In class your assignment is to read the documentation found in the netLogo user manual. You will be reading about things you are familiar with, so you can gain a better understanding of them. 

CLASSWORK: Read the following sections of the NetLogo User manual:

Learning NetLogo 
Read Tutorials 1-3
-Models
-Commands
-Procedures

Reference 
In the Programming Guide Read 
-Math
-Ask


Some tips:
Learn how math works in netlogo. There is no prefix! There are no [] for mathematical operations!

Square brackets are ONLY for command blocks like ask + repeat:

turtle command:
repeat 4 [ fd 1 rt 3]

observer command:
ask turtles [ die ]

they can be nested:
ask turtles [ repeat 4 [ fd 1 rt 3]  ]
QUESTION: What context is this command?

If you want to do plain math in your commands just user paraenthesis for clarity
set size (size * 2) 
or just leave it alone because the multiplication has to occur before the set command:
set size size * 2

Both equivalent and correct. 




Comments