Answered step by step
Verified Expert Solution
Question
1 Approved Answer
IN NETLOGO Suppose you have a world with just two important rules: 1. No two turtles may have the same pxcor or the same pycor.
IN NETLOGO
Suppose you have a world with just two important rules: 1. No two turtles may have the same pxcor or the same pycor. (Remember that pxcor and pycor are the coordinates of the patch that a turtle is on, and they are always integers.) 2. The world is square. (That is, the width is the same as the height.) You may assume your world is square (i.e. that the settings are set for a square world). It should not matter the size of the world, or whether wrapping is turned on and off. You may only assume that the world is square. Write a procedure that places turtles on patches randomly but guarantees that Rule 1 is preserved. (For up to 8 points): Make this work creating a number of turtles that is one less than the width of the world. For example, in the default world that is 3333 patches, you would create and place 32 turtles in the procedure. After calling , the value of count turtles with should be no more than 1 for any value of x, and ] should be no more than 1 for any value of y. (For the full 10 points): Make this work creating a number of turtles is the same as the width of the world. For example, in the default world that is 3333 patches, you would create and place 33 turtles in the procedure. After calling setup, count turtles with should be exactly 1 for all x from to , and count turtles with should be exactly 1 for all y from toStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started