2015-11-16 HW

posted Nov 16, 2015, 4:47 AM by Samuel Konstantinovich   [ updated Nov 16, 2015, 5:44 AM ]
Homework:
1. Download and install NetLogo (link on course main page)
Test if it works.
2. Watch 3 videos: (These are not kitten videos, you need to undestand the ideas in them. This means if you watch it once, and do not do the accompanying activities you will NOT understand them)
Important: Pay very close attention. You may be quizzed on any/all of these videos the day or two after you are assigned to watch them video(s). This is not a 'pop quiz' since I am telling you about it. I use this tactic to make sure you watch the videos! 
3. Note: In the future if you watch any videos before I assign them (because you watched them ahead of time), it may be a good idea to watch that video again on the evening I assign it to refresh your memory for potential quizzes.

LINK HERE: http://bert.stuy.edu/pbrooks/videos/NetlogoTutorial/NetlogoTutorial.py
1. hint for viewing
2. introduction to netlogo
3. turtles patches and links  
(we will not use links in class, but you may want to use them on your own)


Do Now:

Write a function (filter f L) that takes a list L and a function f. The function f must take a single number, and return a boolean. (This is like:  even? odd? isPrime etc.

The function will return a list made of all of the values that make the function f true, and removing the ones that make it false.
(define stuff '( 1 2 3 4 5 6 7 8 9))
(filter even?  stuff)  results in (2 4 6 8)
(filter odd stuff)  results in (1 3 5 7 9)
(filter isPrime stuff)  results in (2 3 5 7)

Do not use the computer for this. You have similar examples that you have done.



Netlogo - The Other language of the semester.

Comments