### 2017-12-14

posted Dec 14, 2017, 5:54 AM by Konstantinovich Samuel   [ updated Dec 14, 2017, 9:25 AM ]
 Remember:  The final exam will NOT contain scheme questions.Do Now:0. Log in (Then do the next 2 problems on paper!)Open and run your lab from yesterday.Modify the spin-timer to initialize to 180.1. Given a list nums that contains integers in no particular order and an integer value:Write a function   to-report countValue [ nums value ]This reports the number of times value appears in the list of numbers.for example:show countValue [3 1 9 3 4 2 3 4 3]  3   > 4show countValue [3 1 9 3 4 2 3 4 3]  4   > 22. Write a function to initializeWorld [ n ]This causes n turtles to be distributed around the world randomly. This should happen in such a way that no two turtles are on the same patch, and there is an equal probability that the turtles start on each patch.Classwork:I. Go Over Different VersionsII. Final Project Partner Finding - -If you need a partner - get up and move to the designated area to discuss who will work together. -If you have a partner - discuss possible model ideas.-If you are working solo - look through models and find 2 that you would want to extend. Finally:Fill this out when you are done pairing https://goo.gl/forms/Ufc1Jp9zgfOjktnV2Suggestions for controlling your models.III. Mouse Clicks - Add to your model:Goal:When you press the mouse, each turtle chooses a new state randomly. This should happen exactly ONCE per mouse click. With a neighbor:Use the dictionary to find mouse related functions and examples. Discuss 1. How you could make this happen (ignoring the once per click restriction)2. Why would this happen more than once per mouse click?3. How can you remedy this?